2023-02-20 16:50:10 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
uid="$1"
|
|
|
|
|
|
|
|
if [ -z "$uid" ]; then
|
|
|
|
echo "Need a user ID (uid)!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-07-23 14:18:32 -05:00
|
|
|
ldappasswd -D 'cn=root,dc=aninix,dc=net' -W -H ldap://127.0.0.1 "uid=$uid,ou=People,dc=aninix,dc=net"
|
2023-02-20 16:50:10 -06:00
|
|
|
|
2024-07-23 14:18:32 -05:00
|
|
|
#ldapmodify -D 'cn=root,dc=aninix,dc=net' -W -H ldap://127.0.0.1 -f <(printf "dn: uid=$uid,ou=People,dc=aninix,dc=net\nchangetype: modify\nadd: pwdReset\npwdReset: TRUE\n\n")
|
2023-02-20 16:50:10 -06:00
|
|
|
|
|
|
|
exit $?
|