This commit is contained in:
parent
4576ecd885
commit
92a5316886
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user