ldap-admin/bin/change-password

9 lines
238 B
Bash
Executable File

#!/bin/bash
#% change-password user
#% Change the password of a user
#% Does not require commit!
USER="$1"
PW=${2:-`pwgen 10 1`}
ldappasswd -x -ZZ -W -D $ME -s "$PW" "uid=$USER,ou=People,dc=hackerspace,dc=pl" && echo "New password: $PW"