From 6070a188fc9b70c0fe4646cbcc12e63600a0bf78 Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Thu, 22 Dec 2022 11:53:51 +0100 Subject: [PATCH] ldap - new step to test ldaps connection as user --- seqs/ldap.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/seqs/ldap.sh b/seqs/ldap.sh index 089e33e..d03bb27 100755 --- a/seqs/ldap.sh +++ b/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 ' '; } +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() {