Way too little LDAP code
authorDan Scott <dan@coffeecode.net>
Mon, 22 Aug 2011 20:22:33 +0000 (16:22 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 7 May 2013 18:37:29 +0000 (14:37 -0400)
Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
tools/patron-load/ldap_sync [new file with mode: 0644]

diff --git a/tools/patron-load/ldap_sync b/tools/patron-load/ldap_sync
new file mode 100644 (file)
index 0000000..32b8888
--- /dev/null
@@ -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