Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 775 Bytes

ldapsearch.md

File metadata and controls

16 lines (13 loc) · 775 Bytes

ldapsearch

ldapsearch -x -H ldap://<IP> -D '' -w '' -b "DC=<1_SUBDOMAIN>,DC=<TLD>"
ldapsearch -H ldap://10.10.63.176 -D AAA\\administrator -w '123qwe!@#' -b "CN=full name1,CN=users,DC=aaa,DC=bbb,DC=ccc"
ldapsearch -H ldap://10.10.63.176 -D 'AAA\administrator' -w '123qwe!@#' -b "CN=full name1,CN=users,DC=aaa,DC=bbb,DC=ccc"
ldapsearch -H ldap://10.10.63.176 -D '[email protected]' -w '123qwe!@#' -b "CN=full name1,CN=users,DC=aaa,DC=bbb,DC=ccc"

get users

ldapsearch -h 10.10.10.161 -x -b "DC=htb, DC=local" '(objectClass=User)' sAMAccountName |grep sAMAccountName

# get username and description
ldapsearch -h 10.10.10.161 -x -b "DC=htb, DC=local" '(objectClass=User)' samaccountname description|grep -i "description\|samaccountname" -B1