From 751d95336a8ac9f300e4a4ba0f5bde195d062ddb Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Wed, 25 Apr 2018 16:43:16 +0200 Subject: [PATCH] fixes (clear-text-passwords on create, ...) --- 90.user.ldif.sh | 8 ++++---- 99.passwordrecovery.ldif.sh | 7 ++++--- README.adoc | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) mode change 100644 => 100755 99.passwordrecovery.ldif.sh diff --git a/90.user.ldif.sh b/90.user.ldif.sh index ba3d437..61e4cc1 100755 --- a/90.user.ldif.sh +++ b/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 diff --git a/99.passwordrecovery.ldif.sh b/99.passwordrecovery.ldif.sh old mode 100644 new mode 100755 index 1d5b68d..a5093fa --- a/99.passwordrecovery.ldif.sh +++ b/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 <