From 0a1ccadda2feb6b55a8d434da187d852739453b7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 20 Feb 2020 11:56:47 +0100 Subject: [PATCH] +ldaptest --- ldaptest.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 ldaptest.py diff --git a/ldaptest.py b/ldaptest.py new file mode 100644 index 0000000..f28fcf6 --- /dev/null +++ b/ldaptest.py @@ -0,0 +1,8 @@ +import ldap3 +from ldap3 import Server, Connection, ObjectDef, Reader, ALL +import os + +server = Server("ldaps://ldap1.ungleich.ch") +conn = Connection(server, 'cn=Nico Schottelius,ou=users,dc=ungleich,dc=ch', os.environ['PW'], auto_bind=True) + +print(conn)