15 lines
381 B
Bash
Executable File
15 lines
381 B
Bash
Executable File
#!/bin/bash
|
|
|
|
uid="$1"
|
|
|
|
if [ -z "$uid" ]; then
|
|
echo "Need a user ID (uid)!"
|
|
exit 1
|
|
fi
|
|
|
|
ldappasswd -D 'cn=root,dc=aninix,dc=net' -W -H ldap://127.0.0.1 "uid=$uid,ou=People,dc=aninix,dc=net"
|
|
|
|
#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")
|
|
|
|
exit $?
|