Update the sed action to match the change to "diff -u".
Otherwise the encrypted password of any account who's information changed was shown in the daily email to root. Submitted by: jhb
This commit is contained in:
parent
58c5d72359
commit
d83d160f5a
@ -16,7 +16,7 @@ if [ -f /etc/master.passwd -o -f /etc/group ] ; then
|
|||||||
if cmp -s $bak/master.passwd.bak /etc/master.passwd; then :; else
|
if cmp -s $bak/master.passwd.bak /etc/master.passwd; then :; else
|
||||||
echo "$host passwd diffs:"
|
echo "$host passwd diffs:"
|
||||||
diff -u $bak/master.passwd.bak /etc/master.passwd |\
|
diff -u $bak/master.passwd.bak /etc/master.passwd |\
|
||||||
sed 's/^\([<>] [^:]*\):[^:]*:/\1:(password):/'
|
sed 's/^\([^:]*\):[^:]*:/\1:(password):/'
|
||||||
mv $bak/master.passwd.bak $bak/master.passwd.bak2
|
mv $bak/master.passwd.bak $bak/master.passwd.bak2
|
||||||
cp -p /etc/master.passwd $bak/master.passwd.bak
|
cp -p /etc/master.passwd $bak/master.passwd.bak
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user