Last active
April 8, 2016 22:00
-
-
Save zushane/a38f156823b5c90dcfe6ada6dea80c9c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: $(basename $0) user" | |
exit 99 | |
fi | |
HOST=ldap.example.com | |
BASE_DN="dc=example,dc=com" | |
ROOT_DN="cn=admin,${BASE_DN}" | |
USER_DN="uid=${1},ou=Users,${BASE_DN}" | |
echo "Changing password for $1." | |
ldappasswd -h $HOST -x -D $ROOT_DN -W -S $USER_DN | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment