2 ###############################################################################
3 # (c) Copyright Hewlett-Packard Development Company, L.P., 2005
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of version 2 the GNU General Public License as
7 # published by the Free Software Foundation.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ###############################################################################
19 # Verify audit of changes to a user's password.
21 source tp_auth_functions.bash ||
exit 2
24 useradd
-n -u $uid $user || exit_error
"useradd failed"
25 password
=$
(perl
-le 'print crypt "drowssap", "42"') || exit_error
"perl failed"
28 setpid usermod
-p "$password" $user || exit_error
"usermod failed"
31 "op=changing password acct=$user exe=./usr/sbin/usermod.*res=success.*"
33 augrok
-q type=USER_CHAUTHTOK \
36 auid
=$
(</proc
/self
/loginuid
) \
37 msg_1
=~
"$msg_1" || exit_fail
"missing: \"$msg_1\""