简体   繁体   中英

Python ldap module not throwing any exception

I am trying to use LDAP python link to use this function. I am simply trying to implement this as a function . Passing parameters something like this:

check_credentials(username="xxxxxx",password="xxx")

But it goes into hanged state and after 5-7 mins it completes execution with no output. Can someone suggets me some good article for this

From looking at your sample code, the LDAP_USER_NAME is a not in the expected DN (distinguished name) format. Typically, Active Directory users have a DN in the format of cn=<username>,cn=users,<domain>. For example, user bjensen in the example.com domain typically would have this DN: cn=bjensen,cn=users,dc=example,dc=com

My guess is that either Active Directory or the Python LDAP library may not return invalid credentials if the DN part is incorrect.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM