How to get an e-mail on user login

Yeah, maybe I am a bit paranoid, but I want to know in real-time who logs into and from which address to my machines.

Since logging that to file is too much insecure (if one gets the control of the machine, he can delete every file he wants..) I built a script that sends me an alert e-mail each time a user logs in.

It uses mutt to compose an e-mail attaching the output of some commands.

The script is quite simple:


# Login notification script
# 2009-11-20 00:28 Samuele ~redShadow~ Santi
# Under GPL

# Place it into /etc/profile ...

Page 1 / 1