Last active
August 29, 2015 14:01
-
-
Save futureimperfect/124c763ece3aca993da3 to your computer and use it in GitHub Desktop.
Complex LDAP query with ldapsearch
This file contains 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 -LLL -x -H ldap://ldap.example.com -b "ou=someou,dc=example,dc=com" '(&(nickname=M*)(employeeType=fulltime)(|(!(departmentNumber=5*))(loginShell=/bin/bash)))' mail | awk '/mail: / { print $2 }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment