Browse Source

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

master
Denis Knauf 4 years ago
parent
commit
751d95336a
  1. 8
      90.user.ldif.sh
  2. 7
      99.passwordrecovery.ldif.sh
  3. 2
      README.adoc

8
90.user.ldif.sh

@ -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

@ -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`

2
README.adoc

@ -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:

Loading…
Cancel
Save