fixes (clear-text-passwords on create, ...)

This commit is contained in:
Denis Knauf 2018-04-25 16:43:16 +02:00
parent 027d68efbc
commit 751d95336a
3 changed files with 9 additions and 8 deletions

View file

@ -18,8 +18,8 @@ objectClass: organizationalPerson
objectClass: inetOrgPerson
cn: $1
uid: $1
givenName:: `echo "$2" | base64`
sn:: `echo "$3" | base64`
mail:: `echo "$4" | base64`
userPassword:: `slappasswd -h '{CRYPT}' -c '$5$rounds=8000$%.16s' -s "$pw" | base64 -w0`
givenName: $2
sn: $3
mail: $4
userPassword:: `echo "$pw" | base64 -w0`
EOF

7
99.passwordrecovery.ldif.sh Normal file → Executable file
View file

@ -1,6 +1,6 @@
#!/bin/sh
if ! [ 4 -eq $# ]
if ! [ 1 -eq $# ]
then
echo "Usage: $0 \$userdn" >&2
echo "random password will be printed. Use ldappasswd for changing it" >&2
@ -8,13 +8,14 @@ then
fi
user="$1"
pw=`pwgen 8 1`
pw=`pwgen 12 1`
echo "# Password: $pw" >&2
cat <<EOF
dn: $1
changeType: modify
replace: userPassword
userPassword:: `/usr/sbin/slappasswd -h '{CRYPT}' -c '$5$rounds=8000$%.16s' -s "$pw" | base64 -w0`
userPassword:: `echo "$pw" | base64 -w0`
EOF
#userPassword:: `/usr/sbin/slappasswd -h '{CRYPT}' -c '$5$rounds=8000$%.16s$' -s "$pw" | base64 -w0`

View file

@ -63,7 +63,7 @@ Changing Passwords
For changing password use:
ldappasswd -xASD $yourdn
ldappasswd -xSWD $yourdn
If you forgot your password, the administator can change the password via: