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
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to