diff --git a/confd/templates/add_ldap_user.tmpl b/confd/templates/add_ldap_user.tmpl index 92bc74c..032c7f4 100644 --- a/confd/templates/add_ldap_user.tmpl +++ b/confd/templates/add_ldap_user.tmpl @@ -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