Allert when a certain user logs in


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Allert when a certain user logs in
# 1  
Old 10-17-2010
Allert when a certain user logs in

hi there
i am new to the unix environment and im trying to write a script that will alert me when a certain user logs in.
help is appreciated thank you
# 2  
Old 10-17-2010
you can start from who |grep USERID
# 3  
Old 10-18-2010
That'll just tell the OP who's logged in now. I think what is asked for, is a script that will log or perhaps send mail when someone logs in.
Przemekny, You'll have to monitor certain logfiles, I don't know which ones, google ought to help you there,

Edit: It looks as if programs called last or lastlog might help.

Last edited by kurtdriver; 10-18-2010 at 02:44 AM..
# 4  
Old 10-18-2010
Hi przemekny
What kind of alert you are looking for. Is it sending through mail or at the prompt only.
# 5  
Old 10-18-2010
if you have audit daemon turned on (depending on what OS also)
Code:
man ausearch

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If I ran perl script again,old logs should move with today date and new logs should generate.

Appreciate help for the below issue. Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt.............. 1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies

2. Shell Programming and Scripting

Script to append user details as soon as he logs in

I'm wishing to create a log myself where I wish to: 1.Write a script in /bin folder to make a separate log in var/log folder & 2.Call the script in bashrc each time a user logs in, I'm trying to avoid CRONJOB as it would take too much of my memory after iterations. So I just need to append the... (2 Replies)
Discussion started by: Lionking93
2 Replies

3. HP-UX

Suppress SSH login logs of a user

Hi, I want to suppress ssh login logs of a particular user to get logged in /var/adm/syslog/syslog.log As am using a user to monitor a server over ssh in 5 miute interval..and that creating un-necessary logs in my syslog.log file .. Please help me if there any way I can suppress this logs only... (6 Replies)
Discussion started by: Shirishlnx
6 Replies

4. Shell Programming and Scripting

Email alerts whenever someone logs into server via SSH any user?

Hi all, Thanks in Advance!! I dont know how to start to write script for this process, my requirement is if any user logs into server automatically Admin get mail alert. how is this possible? any one guide me to complete this process. (1 Reply)
Discussion started by: anishkumarv
1 Replies

5. Shell Programming and Scripting

Create a script that executes when a user attempts to delete history logs

Hi, I have a linux redhat 9 server and I am concerned about the security on that server. I would like to be able to write a script that records all the commands that were typed at the command prompt before the user calls the 'history -c' command and deletes all the history. I was thinking about... (4 Replies)
Discussion started by: mishkamima
4 Replies

6. Shell Programming and Scripting

Grep yesterday logs from weblogic logs

Hi, I am trying to write a script which would go search and get the info from the logs based on yesterday timestamp and write yesterday logs in new file. The log file format is as follows: """"""""""""""""""""""""""... (3 Replies)
Discussion started by: harish.parker
3 Replies

7. UNIX for Advanced & Expert Users

How to find one partucular user logs when there are lots of users running on it

On my application there are lots of users are doing there work or tasks? ...In my SSH or in 'Putty' i am observing logs? Hot to observe one particular 'user' logs.. even through there are lots of users working on it? For EX: i am log in with use rid:nikhil@in.com. another one log in with... (4 Replies)
Discussion started by: ksr.test
4 Replies

8. Shell Programming and Scripting

Script to delete logs or take backups under specific user

I have to write a shell script like this-- 1) Utility will be run under the directory owner. 2) This utility will clean files in ABC/logs. And following logs will be backed up or deleted. Dispatcher Logs Middle tier Logs Sage log Sage monitor log Sage db clean up result log Core files ... (12 Replies)
Discussion started by: namishtiwari
12 Replies

9. UNIX for Dummies Questions & Answers

Process launched by user who logs out, continue running ?

Lets say a user starts a process (either a shell script or a Perl script) and before that process finishes, he logs out (either intentionaly or network problems or ...), does the process continu running ? Default shell is Korn. This is because at my job (being trained), there are tasks to run... (2 Replies)
Discussion started by: Browser_ice
2 Replies

10. UNIX for Dummies Questions & Answers

Send mail when user logs in.

Hi All, I have a specific requirement hope you guys can help me resolve this problem. I want to send an email when a specific user logs in.. Eg: My User ID on the Unix box is VENKYA when I log into the System can we send a mail that I logged in. I am on a Sun Solaris Server. ... (3 Replies)
Discussion started by: venkyA
3 Replies
Login or Register to Ask a Question