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:
http://www.python-ldap.org/doc/html/ldap.html#functions

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

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to