Root User Login Email alert

on August 2 | in Commands, LAMP, Linux, SCRIPTING | by | with No Comments

For Root user login alert please add below code in .bashrc. Then logout and login again.

echo ‘ALERT – Root Shell Access `hostname` on:’ `date` `who` | mail -s “Alert: Root Access from `who | cut -d”(” -f2 | cut -d”)” -f1`” email@domain.com

1107 Total Views 1 Views Today
Pin It

related posts

Comments are closed.

« »