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 objectClass: inetOrgPerson
cn: $1 cn: $1
uid: $1 uid: $1
givenName:: `echo "$2" | base64` givenName: $2
sn:: `echo "$3" | base64` sn: $3
mail:: `echo "$4" | base64` mail: $4
userPassword:: `slappasswd -h '{CRYPT}' -c '$5$rounds=8000$%.16s' -s "$pw" | base64 -w0` userPassword:: `echo "$pw" | base64 -w0`
EOF EOF

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

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