ldapsearch -x -h 10.10.10.175 -s base namingcontexts
copy the namingcontexts: DC=EGOTISTICAL-BANK,DC=LOCAL
ldapsearch -x -h 10.10.10.175 -b 'DC=EGOTISTICAL-BANK,DC=LOCAL' -s sub
-x for simple authentication
-s for scope
-h for host
-b for basedn for search
if you are lucky then you shall get all the usernames listed in AD.
ldapsearch -x -h 10.10.10.175 -b 'DC=EGOTISTICAL-BANK,DC=LOCAL' '(objectClass=Person or User) sAMAccountName | grep -i samaccountname
you shall get a lists of users.
Comments
Post a Comment