Quote:
Originally Posted by danmartinj
Hello,
Been looking at some linux commands like ldapsearch to query status on domain user accounts. I am pretty sure ldapsearch supports this but I am also pretty sure you have to supply it a domain controller to query. With windows you do not have to do this:
Code:
net user USER /domain
I am just trying to figure out the most simplest and stable command to use on Linux. Does anyone have any suggestions?
|
You say you don't have to specify a domain controller in Windows...yet you're specifying a domain in the command-line you're using. Which (by default) will resolve back in Windows to the domain controller you're attached to. Meaning in essence, you ARE providing one.
The ldapsearch man pages have the switches you need, and there are many examples you can find. With TLS:
Code:
ldapsearch -H ldaps://domain.controller.com -x -W -D "user@name.com" -b "dc=controller,dc=com" "(sAMAccountName=someuser)"
And without:
Code:
ldapsearch -H ldap://domain.controller.com -x -W -D "user@name.com" -b "dc=controller,dc=com" "(sAMAccountName=someuser)"