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 [EMAIL PROTECTED]:1:[EMAIL > PROTECTED]@@@.net > -- > "no, 'eureka' is greek for 'this bath is too hot.'" > -- dr. who > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] >