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