|
|
@@ -28,7 +28,9 @@ while getopts 'u:n:s:p?g:?' opt; do
|
|
|
esac
|
|
|
done
|
|
|
|
|
|
-pw=$(/usr/sbin/slappasswd -s "salut$uid")
|
|
|
+clearpw=$(pwgen 50 1)
|
|
|
+pw=$(/usr/sbin/slappasswd -o module-load=pw-sha2 -h '{SSHA512}' -s "$clearpw")
|
|
|
+
|
|
|
|
|
|
if user_exists $uid; then
|
|
|
echo "User $uid already exists."
|
|
|
@@ -49,3 +51,6 @@ echo "$user" | ldapadd $LDAPOPTS
|
|
|
[ -n "$posix" ] && echo posix && ./person2posix $uid
|
|
|
|
|
|
[ -n "$grouplist" ] && echo groups && ./addtogroups $uid $grouplist
|
|
|
+
|
|
|
+echo "User $uid created, here is their password :"
|
|
|
+echo "$clearpw"
|