> > There's probably a reason why Part N+1 of setting up a hopefully-secure
> > box is automating a task that finds all set[ug]id files and mails you a
> > list every night....!
> Got a handy script you can share for this?
-------------------------------------
#!/bin/sh
#
# Lists SGID & SUID files
# and emails to postmaster.
#
# The "find command cat" line gets wraped in email.
# you can remove the \ on the find line and move the
# cat line back to the end of the find line
#
(
echo "Subject: Daily SGID & SUID audit report"
echo
PATH=/sbin:/usr/sbin:/bin:/usr/bin:
export PATH
echo "List of SGID & SUID files on the system include:"
echo
find / -type f \( -perm -04000 -o -perm -02000 \) \
\-exec ls -lg {} \;| cat
) 2>&1 | /usr/lib/sendmail -t
exit 0
----------------------------------------------
#!/bin/sh
#
# Lists SGID files
# and emails to postmaster.
#
(
echo "Subject: Daily SGID audit report"
echo
PATH=/sbin:/usr/sbin:/bin:/usr/bin:
export PATH
echo "List of SGID files on the system include:"
echo
find / -type f \( -perm -02000 \) \-exec ls -lg {} \;| cat
) 2>&1 | /usr/lib/sendmail -t
exit 0
---------------------------------------------
#!/bin/sh
#
# Lists SUID files
# and emails to postmaster.
#
(
echo "Subject: Daily SGID audit report"
echo
PATH=/sbin:/usr/sbin:/bin:/usr/bin:
export PATH
echo "List of SGID files on the system include:"
echo
find / -type f \( -perm -04000 \) \-exec ls -lg {} \;| cat
) 2>&1 | /usr/lib/sendmail -t
exit 0
-------------------------------
--
Confucius say: He who play in root, eventually kill tree.
Registered with the Linux Counter. http://counter.li.org
ID # 123538
Completed more W/U's than 98.987% of seti users. +/- 0.01%