From df585a9e64b65d34d2e9c0445e0187cc9bfad061 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Mon, 22 Aug 2011 16:22:33 -0400 Subject: [PATCH] Way too little LDAP code Signed-off-by: Dan Scott Signed-off-by: Dan Scott --- tools/patron-load/ldap_sync | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tools/patron-load/ldap_sync diff --git a/tools/patron-load/ldap_sync b/tools/patron-load/ldap_sync new file mode 100644 index 0000000000..32b8888bae --- /dev/null +++ b/tools/patron-load/ldap_sync @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +import ldap, sys + +con = ldap.initialize('ldap://142.51.1.188') + +#try: +# con.start_tls_s() +#except ldap.LDAPError, e: +# print e.message['info'] +# if type(e.message) == dict and e.message.has_key('desc'): +# print e.message['desc'] +# else: +# print e +# sys.exit() +# + +dn = "uid=Libr_LDAP;ou=EMPL;o=LUL" +pw = "" + +auth = con.simple_bind_s(dn, pw) +print auth -- 2.11.0