email alert on root login
vi .bash_profile
Scroll down to the end of the file and add the following line:
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`" user@example.com
i follow this but not getting the emails on root login
what i missing?