LDAPAttrib is a tool to read and modify LDAP attributes.
usage: LDAPAttrib.py [-h] [-dc-ip DOMAINCONTROLLER] [--port PORT] [-s] [-u USER] [-p PASSWORD] [-dn DISTINGUISHEDNAME] [-b BASEDN] [-a ATTRIB] [-v VALUE] [-r] [-m] [-f FILTER] [-maq]
options:
-h, --help show this help message and exit
-dc-ip DOMAINCONTROLLER, --domaincontroller DOMAINCONTROLLER Server name or IP of Domain Controller.
--port PORT Port for LDAP.
-s, --ssl Enable SSL. Default: False
-u USER, --user USER Username to authenticate with. Format: DOMAIN\Username
-p PASSWORD, --password PASSWORD Password for username.
-dn DISTINGUISHEDNAME, --distinguishedname DISTINGUISHEDNAME Distinguished name of object to read or modify.
-b BASEDN, --basedn BASEDN Define base Distinguished Name.
-a ATTRIB, --attrib ATTRIB Attribute to modify or read.
-v VALUE, --value VALUE Value to give attribute.
-r, --read Read an attribute. Default Setting
-m, --modify Modify an attribute.
-f FILTER, --filter FILTER Define LDAP filter.
-maq, --MachineAccountQuota Query ms-DS-MachineAccountQuota attribute. Requires BaseDN to be defined.
Read an attribute
LDAPAttrib.py -dc-ip 192.168.57.13 -r --basedn BASE DISTINGUISHED NAME -f '(FILTER)' -a ATTRIBUTE -u DOMAIN\USERNAME
Modify an attribute
LDAPAttrib.py -dc-ip DOMAIN CONTROLLER -m -dn DISTINGUISHED NAME -a ATTRIBUTE --value VALUE -u DOMAIN\USERNAME
Reading ms-DS-Machine-Account-Quota
LDAPAttrib.py -dc-ip DOMAIN CONTROLLER --basedn BASE DISINGUISHED NAME -maq -u DOMAIN\USERNAME