>>> import ldap
>>> conn = ldap.initialize('ldap://zion.karunya.edu')
>>> conn.protocol_version = 3
>>> conn.set_option(ldap.OPT_REFERRALS, 0)
>>> conn.simple_bind_s('username', 'password')
The last line always raises the annoying InvalidCredentials
exception. I'm sure that the password is right. I even tried other username, password combinations (of my friends).
Also note that a friend who is using PHP adLDAP
plugin faces no problem. And I've spent hours trying to figure out this stupid problem. Any ideas?
You will need to bind the user using complete DN. for example
USERNAME = 'CN=abc,OU=abc,DC=abc,DC=abc,DC=com'
I hope this helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.