On Thu, Jan 27, 2011 at 11:47 PM, David <courn...@gmail.com> wrote:
> FWIW, I could not make it work using the python ldap library either:
>  l = ldap.open("x.x.x.x:389")
>  username = "cn=admin,dc=x,dc=y,dc=z"
>  password = "xxxxxxxxx"
>  l.simple_bind(username, password) # fails with (2, 'No such file or
> directory')

Specifying a port in open() uses a kword argument, rather than
":<portnum>", i.e.:
l = ldap.open("x.x.x.x", port=389)

The default is 389, so you can also omit that entirely, and just:
l = ldap.open("x.x.x.x")

Also, FWIW, the open() function is deprecated in favor of
initialize(), which uses the LDAP URL syntax where the port number
_is_ set using a colon trailing the hostname, like this:
l = ldap.initialize("ldap://x.x.x.x:389/dc=example,dc=org";)

For reference:

Dan Young <dyo...@mesd.k12.or.us>
Multnomah ESD - Technology Services

Want to help the Review Board project? Donate today at 
Happy user? Let us know at http://www.reviewboard.org/users/
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to