uncloud/ldaptest.py

9 lines
253 B
Python
Raw Normal View History

2020-02-20 10:56:47 +00:00
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)