uncloud/ldaptest.py
Nico Schottelius 0a1ccadda2 +ldaptest
2020-02-20 11:56:47 +01:00

8 lines
253 B
Python

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)