fixx add_user script
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Mauro Torrez 2019-09-30 19:46:27 -03:00
parent aa2b9b5dca
commit 3b877a763f

View File

@ -41,6 +41,9 @@ LDAP_ADMIN_PASSWORD="{{ getv "/admin/password" }}"
LDAP_DOMAIN="{{ getv "/domain" }}" LDAP_DOMAIN="{{ getv "/domain" }}"
LDAP_DOMAIN_DN="{{ getv "/domain/dn" }}" LDAP_DOMAIN_DN="{{ getv "/domain/dn" }}"
DN0="dc=${LDAP_DOMAIN//./,dc=}"
LDAP_DOMAIN_DN=${LDAP_DOMAIN_DN:=${DN0}}
[[ -n ${USER_UID} ]] || { [[ -n ${USER_UID} ]] || {
echo -n "Enter user UID (e.g. jdoe) > " echo -n "Enter user UID (e.g. jdoe) > "
read USER_UID read USER_UID
@ -91,4 +94,5 @@ ldapadd -H ldapi:/// -D cn=${LDAP_ADMIN_CN},${LDAP_DOMAIN_DN} \
email: ${USER_EMAIL} email: ${USER_EMAIL}
EOF EOF
assert "Error adding user!" assert "Error adding user!"