fix add user script
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Mauro Torrez 2019-09-30 20:02:36 -03:00
parent 4576ecd885
commit 92a5316886

View File

@ -55,7 +55,7 @@ RES_DN=$(ldapsearch -LLL -H ldap:/// -D cn=${LDAP_ADMIN_CN},${LDAP_DOMAIN_DN} \
-w "${LDAP_ADMIN_PASSWORD}" -s base \
-b "uid=${USER_UID},ou=People,${LDAP_DOMAIN_DN}" \
"(objectClass=*)" \
| egrep '^dn: ' | sed -e 's/^dn: //g')
| egrep '^dn: ' | sed -e 's/^dn: //g' 2>/dev/null)
[[ -z ${RES_DN} ]]
assert "User already present. Please choose a different UID."
@ -92,7 +92,7 @@ ldapadd -H ldap:/// -D cn=${LDAP_ADMIN_CN},${LDAP_DOMAIN_DN} \
sn: ${SURNAME}
uid: ${USER_UID}
userPassword: ${PWHASH}
email: ${USER_EMAIL}
mail: ${USER_EMAIL}
EOF