Skip to content

Instantly share code, notes, and snippets.

View jamesperrin's full-sized avatar
✝️
Working it

James Perrin jamesperrin

✝️
Working it
View GitHub Profile
@JosefJezek
JosefJezek / ldap2csv.py
Last active April 23, 2022 07:49
Export Users from Active Directory / LDAP to CSV file with Python
#!/usr/bin/python
# http://www.packtpub.com/article/python-ldap-applications-ldap-opearations
# sudo apt-get install python-ldap
import ldap
host = 'ldap://example.com:389'
dn = '[email protected]'