This commit is contained in:
parent
3b877a763f
commit
656382d46b
@ -5,6 +5,7 @@ usage() {
|
|||||||
usage: docker exec [...] add_ldap_user [-c COMMON_NAME] [-s SURNAME] [-u UID] [-p PASSWORD] [-e EMAIL]
|
usage: docker exec [...] add_ldap_user [-c COMMON_NAME] [-s SURNAME] [-u UID] [-p PASSWORD] [-e EMAIL]
|
||||||
Unset options will be prompted interactively.
|
Unset options will be prompted interactively.
|
||||||
EOF
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
COMMON_NAME=
|
COMMON_NAME=
|
||||||
USER_UID=
|
USER_UID=
|
||||||
@ -74,7 +75,7 @@ assert "User already present. Please choose a different UID."
|
|||||||
echo -n "Enter user email (leave blank for ${USER_UID}@${LDAP_DOMAIN}) > "
|
echo -n "Enter user email (leave blank for ${USER_UID}@${LDAP_DOMAIN}) > "
|
||||||
read USER_EMAIL
|
read USER_EMAIL
|
||||||
}
|
}
|
||||||
[[ -n ${USER_EMAIL} ]] || USER_EMAIL="${USER_UID}@${LDAP_DOMAIN}"
|
USER_EMAIL="${USER_EMAIL:=${USER_UID}@${LDAP_DOMAIN}}"
|
||||||
|
|
||||||
|
|
||||||
PWHASH=$(slappasswd -h "{SSHA}" -s "${USER_PASS}")
|
PWHASH=$(slappasswd -h "{SSHA}" -s "${USER_PASS}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user