Powered by Blogger.

Saturday, December 26, 2009

Get server email alerts on the root login


Append the following line at the end of your ~/.bashrc file.
echo 'ALERT - Root Shell Accesson :' 'date' 'who' | mail -s "Alert: Root Access from 'who | awk "{print $6}' "Your_email_address"

0 comments

Post a Comment