sobota, 15 grudnia 2007

security tip: mail me if sb logs to root

It should work simple, it should be fast, it won't be persistent unless you use a root account to everyday work. It make you system a little bit more secure, it can help you, when it is to late to recover log files :)

just edit .bashrc root file, and put there sth like this:
echo 'ALERT - Root Shell Access at ServerName on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`"

0 komentarze: