Re: mail script
hi ya
in .login ( or .bash_profile )
assuming your environment variables are set "properly"
DATE=`date`
mail -s "$USER on $HOST logged in at $DATE " myaddress < /dev/null
also works good for anybody that logs in as root...
that not supposed to be...
c ya
alvin
On Mon, 5 Mar 2001, MaD dUCK wrote:
> 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
>
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
Reply to: