12 lines
333 B
Bash
12 lines
333 B
Bash
#!/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
|