How can I capture (or access if there is a log file somewhere) when a user changes their password or another user's password?
Can you explain where that is?
Abdullah Jibaly
2009-02-02 22:05:46
A:
Just replace passwd command on the $PATH environment variables by a shell script that, by example do this:
- log $USER environment variable content to a file
- Call passwd
Or you can do same by making an user alias for passwd command:
alias passwd='echo "On `date +%Y%m%d` user $USER call passwd utility" && passwd'
Regards
EDIT: This is correct if you want to log where an user call passwd command if you want to log if an user changes succesfully his password use passwd return value from your shell.
SourceRebels
2009-02-02 11:57:14