Python and Ldap

Install Ldap

C:\Users\dmann2\Downloads>pip install ldap3
Collecting ldap3
  Downloading ldap3-1.2.2-py2.py3-none-any.whl (311kB)
    100% |################################| 317kB 1.6MB/s
Collecting pyasn1>=0.1.8 (from ldap3)
  Downloading pyasn1-0.1.9-py2.py3-none-any.whl
Installing collected packages: pyasn1, ldap3
Successfully installed ldap3-1.2.2 pyasn1-0.1.9

Test it

Fire up python and:
>>> from ldap3 import Server, Connection, ALL
>>> server = Server('ipa.demo1.freeipa.org')
>>> conn = Connection(server)
>>> conn.bind()
True
>>> print (conn)
ldap://ipa.demo1.freeipa.org:389 - cleartext - user: None - bound - open -  - tls not started - listening - SyncStrategy - internal decoder
>>>

Get familiar with the OID schema

OID : Managing Directory Schema