1753809 Members
8162 Online
108805 Solutions
New Discussion юеВ

Alert for user login

 
Son dam bi
Advisor

Alert for user login

Can advise if I want to have a alert message when a specific user is login to the system , what can I do ? that mean if a specific is login to system then send me a alert message ( by any way ) to inform me the user is login , what is the method ? thanks
3 REPLIES 3
Johnson Punniyalingam
Honored Contributor

Re: Alert for user login

Country / Region: korea
Personal quote:
Certification:
ITRC member since: July 23, 2009
Last contribution date: December 08, 2009
I have assigned points to 29 of 75 responses to my questions.

Please assign points, so ppl, who help to advice and resolve your problem & Questions
Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: Alert for user login

>>>if I want to have a alert message when a specific user is login to the system , what can I do ?<<<

you can edit the .profile of that specfic user
add entry to send email alert ,

mailx -s "YOUR SUBJECT LINE GOES HERE" <

example :

mailx -s "Hello Rosy" email@abc.com.au < subject_text_file.dat

OR

echo "Hi Rosy how are you doing??" | mailx -s "Hello Rosy" email@abc.com.au

Problems are common to all, but attitude makes the difference
Viktor Balogh
Honored Contributor

Re: Alert for user login

I would only take a look at the output of the 'last' command, it displays all the login processes. Or it's about a single specific user, you could have a script running from cron periodically, and check with:

# last USERNAME



****
Unix operates with beer.