i want to setup email alert on ssh root login
i read few forum about this
Scroll down to the end of the file and add the following line:
echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" firstname.lastname@example.org
but it not working then few people suggest that .bashrc is the file in which i need to add the line
but in my centos root directory no file .bashrc
how can i get the email alert??