LDAP bind results failing
Jim Boone
jboone01 at bcuc.ac.uk
Thu Oct 26 12:44:28 CEST 2006
Hi gang,
Ok, first time I've needed to test a bind, whats wrong with it?
l = ldap.initialize("ldaps://server:636",trace_level=2)
l.protocol_version = 3
do a bind a know user, then bounce out the dn for the proper bind. Thats
all good, can thet attributes out and play with happily, I then need to
test the users credentials against ldap in order to then run an LDAP
modify on some attributes, I'm using:
try:
l.simple_bind(dn,oldpass)
valid=True
except ldap.LDAPError, e:
valid=False
if valid:
print "****************valid****************"
else:
print "--------------- nope ----------------"
with the latter being my debug code obviously
It always returns valid, even though with the wrong credentials I can
see the rejection on the LDAP server. LDAP server is Netware, I have a
PERL script which runs against it which does return an 'unauthorized'
result..... Please Lord, don't make me write this in PERL!
Surely this must be straight forward and I'm missing something??
Cheers
Jim
--
Jim Boone
--------------------------------------------
Buckinghamshire Chilterns University College
R&D Manager - Information and Communication Technologies
Tel: 01494 522141 ext 3569
The myth that Bill Gates has appeared like a knight in shining armor to lead all customers out of a mire of technological chaos neatly ignores the fact that it was he who, by peddling second-rate technology, led them into it in the first place, and continues to do so today.
~Douglas Adams~
More information about the python-ldap
mailing list