LDAP Authentication
Derek Perriero
derek.perriero at gmail.com
Fri Dec 2 14:33:49 EST 2005
Any help would be great on this. I've been trying to bind a username and
password to the ldap server for authentication, but when I locally run this
script:
#!/usr/bin/python
import ldap
## Connect to LDAP host
try:
ldapcn = ldap.initialize('ldap://xxx.xxx.xxx.xxx')
ldapcn.bind('cn=username,o=domain','password',ldap.AUTH_SIMPLE)
print "Successful."
except ldap.LDAPError, e:
print e
print "Declined.\n"
I always get a successful return even if the password or username is
incorrect. Or, if I even leave the username and password field in the
initialize function blank, I get a successful return.
I need some guidance in the correct direction.
Thanks!
Derek
--
Perriero, Derek
derek.perriero at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20051202/94833819/attachment.html>
More information about the Python-list
mailing list