Commit 4b9a417a authored by root's avatar root
Browse files

user-sync.sh: Drop pw check against LDAP.

parent c4ce71ed
......@@ -19,17 +19,7 @@ set -x
USERID=`echo $USERDN | tr A-Z a-z | sed "s/^uid=\([^,]*\),.*$/\1/"`
PATH="/usr/bin:/usr/sbin:/bin:/sbin"
## check if provided password corresponds to hash saved in ldap database:
#set +e
#IAM=`ldapwhoami -x -Z -w "$NEWPW" -D "$USERDN" 2>/dev/null | perl -p00e 's/\r?\n //g' | tr [A-Z] [a-z]`
#if [ "$IAM" = "dn:$USERDN" ] ; then
# set -e
kadmin.local -q "change_password -pw \"$NEWPW\" \"$USERID\"" 1>/dev/null && echo "Updated Kerberos password for user '$USERID'.<br />"
logger -t FusionDirectory-PwHook "Updated Kerberos password for user '$USERID'."
#else
# echo "Warning: Could not verify password for '$USERID'. Nothing done.<br />"
# logger -t FusionDirectory-PwHook "Warning: Could not verify password for '$USERID'. Nothing done."
# exit 1
#fi
kadmin.local -q "change_password -pw \"$NEWPW\" \"$USERID\"" 1>/dev/null && echo "Updated Kerberos password for user '$USERID'.<br />"
logger -t FusionDirectory-PwHook "Updated Kerberos password for user '$USERID'."
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment