sasl bind issues
Uma Sridharan
uma285 at gmail.com
Thu Jul 15 06:19:09 CEST 2010
Hi everyone,
Here is a sample code that works the first time I run the loop and fails the
second time with the following error. can someone let me know if the
credentials are cached by the library or what could be wrong? Any help is
greatly appreciated.
ldap.INVALID_CREDENTIALS: {'info': '80090308: LdapErr: DSID-0C09043E, comment:
AcceptSecurityContext error, data 57, vece', 'desc': 'Invalid credentials'}
import ldap, ldap.sasl
def main():
while True:
ldapServer="lserver"
base ="ou=users,ou=accounts,dc=example,dc=com"
user="user"
passwd="pass"
l = ldap.initialize(ldapServer)
l.set_option(ldap.OPT_REFERRALS, 0)
try:
tok = ldap.sasl.digest_md5(user, passwd)
l.sasl_interactive_bind_s("",tok)
except ldap.INVALID_CREDENTIALS, e :
print "Invalid Username or Password"
print e
return False
print "success"
l.unbind()
if __name__=="__main__":
print "here"
main()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20100714/e47857d9/attachment.html>
More information about the python-ldap
mailing list