python ldap bind error

  • Thread starter Jorge Alberto Diaz Orozco
  • Start date
J

Jorge Alberto Diaz Orozco

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("(e-mail address removed)","password")

every time I do this it gives me the next error:
ldap.INVALID_DN_SYNTAX: {'info': 'invalid DN', 'desc': 'Invalid DN syntax'}

can someone help me???
I don't know what I'm doing wrong

10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS INFORMATICAS...
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION

http://www.uci.cu
http://www.facebook.com/universidad.uci
http://www.flickr.com/photos/universidad_uci
 
M

Michael Ströder

Jorge said:
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("(e-mail address removed)","password")

every time I do this it gives me the next error:
ldap.INVALID_DN_SYNTAX: {'info': 'invalid DN', 'desc': 'Invalid DN syntax'}

"(e-mail address removed)" 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top