- l.simple_bind_s("","");
-UserDn = "uid=" + User + "," + BaseDn;
+ Password = ""
+ BindUserDn = ""
+try:
+ l.simple_bind_s(BindUserDn,Password)
+except ldap.LDAPError,e:
+ print >> sys.stderr, "LDAP error:", e.args[0]['desc']
+ print >> sys.stderr, " ", e.args[0]['info']
+ sys.exit(1)