Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > python ldap bind error

Reply
Thread Tools

python ldap bind error

 
 
Jorge Alberto Diaz Orozco
Guest
Posts: n/a
 
      12-17-2012
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 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
 
Reply With Quote
 
 
 
 
Michael Ströder
Guest
Posts: n/a
 
      12-22-2012
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("(E-Mail 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 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LDAP bind error Pokkai Dokkai Ruby 2 10-08-2007 12:26 PM
python-ldap/win32 or python/ldap/win32 rcmn Python 1 11-06-2006 11:47 PM
Need to wrtie LDAP class to *answer* LDAP queries. junk1@davidbevan.co.uk Java 1 02-21-2006 09:59 PM
[ANN] Ruby/LDAP 0.9.1: LDAP API (RFC1823) library. Ian Macdonald Ruby 0 03-15-2005 11:23 PM
using LDAP Controls in ruby-ldap Jason Wold Ruby 5 11-07-2004 03:35 AM



Advertisments