xref: /csrg-svn/etc/security (revision 52151)
142328Sbostic#!/bin/sh -
242328Sbostic#
3*52151Sbostic#	@(#)security	5.5 (Berkeley) 01/09/92
442328Sbostic#
542328SbosticPATH=/sbin:/bin:/usr/bin
642328Sbostic
7*52151Sbostichost=`hostname`
842328Sbosticecho "Subject: $host security check output"
942328Sbostic
1042328SbosticLOG=/var/log
1142328SbosticTMP=/tmp/_secure.$$
1242328Sbostic
13*52151Sbosticecho ""
1452143Sbosticecho "Checking setuid files and devices:"
1552143Sbosticfind / \( ! -fstype local \) -a -prune -o \
1652143Sbostic	\( -perm -u+s -o -perm -g+s -o ! -type f -a ! -type d \) \
1752143Sbostic	-a -ls 2>&1 > $TMP
1842328Sbostic
1942328Sbosticif cmp $LOG/setuid.today $TMP >/dev/null; then :; else
2042328Sbostic	echo "$host setuid/device diffs:"
2142328Sbostic	diff $LOG/setuid.today $TMP
2242328Sbostic	mv $LOG/setuid.today $LOG/setuid.yesterday
2342328Sbostic	mv $TMP $LOG/setuid.today
2442328Sbosticfi
2542328Sbosticrm -f $TMP
2642328Sbostic
2742328Sbosticecho ""
2842328Sbosticecho ""
2952143Sbosticecho "Checking for uids of 0:"
3042328Sbosticawk 'BEGIN {FS=":"} $3=="0" {print $1,$3}' /etc/master.passwd
31