organzing for portfolio
This commit is contained in:
11
SysadminAutomation/searchLdap.sh
Normal file
11
SysadminAutomation/searchLdap.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
#A script to search LDAP
|
||||
|
||||
#LDAP_SERVER=$(set |grep LOGONSERVER|awk -F '=' '{print $2}'|sed -e 's/\'//g')
|
||||
#echo $LDAP_SERVER
|
||||
|
||||
LDAPSEARCH_OPTIONS="-x -LLL"
|
||||
LDAP_SERVER="some.server.tld"
|
||||
LDAP_SERVER_PORT="1234"
|
||||
|
||||
ldapsearch -LLL -x -W -H ldaps://$LDAP_SERVER:$LDAP_SERVER_PORT -b "dc=$DC1,dc=$DC2" -D mail=$SEARCH_EMAIL uid
|
Reference in New Issue
Block a user