Created
September 29, 2023 11:07
-
-
Save mastier/79b06540f721943f5b724a05e9667d2f to your computer and use it in GitHub Desktop.
ldapsearchbind.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ldapsearch -x -y ldap-password.txt -H ldaps://<server>:636 -D 'CN=....' -E 'pr=10000/noprompt' -b 'OU=....' -W '(&(objectClass=User)(memberOf=CN=))' sAMAccountName | |
| # Remember that ldap-password.txt cannot have newline in the end, so use echo -n 'password' > ldap-password.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment