Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
#Credits: Marc Smith, http://marcitland.blogspot.com/2011/02/python-active-directory-linux.html
# DarkPixel, https://github.com/darkpixel/scripts/blob/master/getadsmtp.py
# JR, http://liveaverage.com
import sys, ldap, argparse
import ldap.modlist as modlist
from ldap.controls import SimplePagedResultsControl