Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
packaging
fusiondirectory-hooks
Commits
4b9a417a
Commit
4b9a417a
authored
Mar 27, 2019
by
root
Browse files
user-sync.sh: Drop pw check against LDAP.
parent
c4ce71ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
user-sync.sh
View file @
4b9a417a
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment