using python_ldap for authentication

jeanmarc.pouchoulon jeanmarc.pouchoulon at free.fr
Thu Sep 1 04:52:12 EDT 2005


> but it seems to succeed whatever the password I'm providing :-(
> 
> How to simply assess the binding really occured ?
It should work...
If you are anxious have a look to your ldapserver logs, you can see the 
bind . Try with an account that have modify rights et do a modify 
request if it fails
you know there is a problem...
> Do I need to start doing stuff with the "l" object to catch an error
> and realize I'm not in fact connected : that's my current workaround
> but I'm not very proud of it...
Try:
	Your code .... initialize
         bind

except ldap.LDAPError,e:
	.....
see
http://homepage.mac.com/mengelhart/python-ldap-samples.html
jmp




More information about the Python-list mailing list