#! /bin/sh
# check /etc/passwd for changes other than new passwords
PATH=/usr/new:/usr/local:/usr/bin:/bin
PASSWD=/etc/passwd
SECURE=/usr/adm/security
STOP=$SECURE/passwd
TEMP=/tmp/pass$$
DIFF=/tmp/diff$$
trap '/bin/rm -f $TEMP $DIFF;exit' 0 1 2 3 15
< $PASSWD field -t: 1 3 4 5 6 7 > $TEMP
diff $TEMP $STOP > $DIFF
if	test -s $DIFF
then	echo "Subject: Changes to /etc/passwd" > $TEMP
	cat $TEMP $DIFF | mail root
	exit 1
else
	exit 0
fi
