One comment

  1. Gerhardus says:

    I added the line to my /etc/bash.bashrc.local file.

    This file gets executed for every user that logs in at least with a bash shell, which is what I’m interested in.

    Also please note unicode characters if you copy and paste from this webpage:

    echo “ALERT – User `whoami` Shell Access on:” `date` `who` | mail -s “Alert: `whoami` Access from “who | awk ‘{print $5}’`” user@yourdomain.com

Leave a Reply

Protected by WP Anti Spam