Re: mail script
also sprach Jaye Inabnit ke6sls (on Mon, 05 Mar 2001 07:19:16PM -0800):
> looking for a quick sript to add to a .bash_profile to mail me when a user
> logs on. I'm pretty unfamiliar with all the stratigies, but would like a
> simple message to myself with time and user name. Any ideas GREATLY
> appreciated :)
cat << EOF | sendmail myaddress
To: myaddress
From: $USER
Subject: login: $USER
i just logged in (`date`).
i don't like how you are spying on me.
EOF
you could also just use /var/log/auth.log, which will basically give
you the same information with far less intrusive action of your part.
martin
[greetings from the heart of the sun]# echo madduck@!#:1:s@\@@@.net
--
"no, 'eureka' is greek for 'this bath is too hot.'"
-- dr. who
Reply to:
- References:
- mail script
- From: Jaye Inabnit ke6sls <ke6sls@snowcrest.net>