ldap - new step to test ldaps connection as user
This commit is contained in:
13
seqs/ldap.sh
13
seqs/ldap.sh
@@ -136,6 +136,19 @@ step_20() {
|
||||
exe ldapwhoami -H ldapi:/// -x
|
||||
}
|
||||
|
||||
step_22_info() { echo 'Test ldaps connection with user access'; }
|
||||
step_22_options() { echo '<LDAP DOMAIN> <USERID>'; }
|
||||
step_22_alias() { echo 'testldaps'; }
|
||||
step_22() {
|
||||
shift
|
||||
local domain="${1:-}"
|
||||
local user="${2:-}"
|
||||
[[ -z "${domain}" ]] && domain=$(ask "LDAP server domain: ")
|
||||
[[ -z "${user}" ]] && user=$(ask "LDAP user: ")
|
||||
exe ldapsearch -x -D "uid=${user},ou=Users,${LDAP_DC}" -W\
|
||||
-H "ldaps://${domain}" -b "ou=Users,${LDAP_DC}" -s sub "uid=${user}"
|
||||
}
|
||||
|
||||
step_80_info() { echo -e "Some ldap command notes\n"; }
|
||||
step_80_alias() { echo "notes"; }
|
||||
step_80() {
|
||||
|
Reference in New Issue
Block a user