Jorge Alberto Diaz Orozco wrote:
> hi there.
> I'm working with python ldap and I need to authenticate my user.
> this is the code I'm using.
>
> import ldap
> ldap.set_option(ldap.OPT_REFERRALS,0)
> ldap.protocol_version = 3
> conn = ldap.initialize("ldap://ldap.domain.cu")
> conn.simple_bind_s("[email protected]","password")
>
> every time I do this it gives me the next error:
> ldap.INVALID_DN_SYNTAX: {'info': 'invalid DN', 'desc': 'Invalid DN syntax'}
"[email protected]" is not a DN as required in RFC 4511:
http://tools.ietf.org/html/rfc4511#section-4.2
MS AD directly accepts a userPrincipalName but this is a highly proprietary
feature => search the user's entry first.
Ciao, Michael.
--
http://mail.python.org/mailman/listinfo/python-list