User Command Monitor


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting User Command Monitor
# 1  
Old 12-24-2009
User Command Monitor

Hi all,
i was wondering if there is a script or package which will record every command executed by the user while he login.
Cheers,
# 2  
Old 12-24-2009

Commands are saved in the history file.

For bash, the default is ~/.bash_history.

For more information, see your shell's man page.
# 3  
Old 12-24-2009
yeah i know about bash_history but i want to make sure that the user can't delete the .bash_history and when the user use sqlplus it record the sql statement also.
# 4  
Old 12-24-2009
Quote:
Originally Posted by co0oly
i want to make sure that the user can't delete the .bash_history

That's not possible.

Last edited by cfajohnson; 12-25-2009 at 01:00 PM..
# 5  
Old 12-24-2009
Quote:
Originally Posted by co0oly
[...]and when the user use sqlplus it record the sql statement also.
You should enable auditing for this.
# 6  
Old 12-28-2009
thanks for replaying Smilie
can i use script command to monitor and trap the crl+d ?
# 7  
Old 12-28-2009
Ctrl+D doesn't send a signal, it marks the end of file.
You can either change that sequence (stty eof ...) or
ignore it (bash - IGNOREEOF, ksh, zsh, (t)csh - ignoreeof).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Infrastructure Monitoring

Searching for Saas Monitor service which monitor my servers which are sitting in different providers

Sorry if this is the wrong forum Searching for Saas Monitor service which monitor my servers which are sitting in different providers . This monitor tool will take as less CPU as possible , and will send info about the server to main Dashboard. The info I need is CPU / RAM / my servers status (... (1 Reply)
Discussion started by: umen
1 Replies

2. Shell Programming and Scripting

Need help on shell script to monitor each user cpu use on a cluster over time

Hi, I am relatively new to the cluster administration and shell scripting. I need help on a shell script which can help me determine how many cpu's over time, any particular ( or all registered users on a cluster ) are using. To generate data say over a period of week and list of users and their... (6 Replies)
Discussion started by: anuj06
6 Replies

3. Shell Programming and Scripting

How to monitor a command inside shell script

Hi All, Is there any way to monitor a command inside shell script ? I have a script inside which I have a tar command which zips around 200GB data. tar zcvf $Bckp_Dir/$Box-BaseBackup-$Day.tar.gz * --exclude 'dbserver_logs/*' --exclude postmaster.pid --exclude 'pg_xlog/*' I want to... (3 Replies)
Discussion started by: sussus2326
3 Replies

4. UNIX for Dummies Questions & Answers

Commands to monitor other user's activity

What commands would you recommend in order to monitor things like when a user logs on to a server, assuming you know that user's name on the server? (2 Replies)
Discussion started by: Sotau
2 Replies

5. Shell Programming and Scripting

How to Monitor printer buffer using unix command

Hi, I have 13jobs waiting in a printer queue.I am try to get the status and number of jobs using lpstat but i cant see any job is waiting in queue.i think those jobs are in printer buffer.is there any way to get the status of printer buffer too using unix command.please correct me if i am wrong. i... (1 Reply)
Discussion started by: sagii
1 Replies

6. AIX

command to monitor the Serial port

Hi, Can anyone please tell me how to check the status of the serial port ?? for example,in Sun os we use the command pmadm to see the status of the serial port-- So is there any command or method in AIX,So that i can see the serial port status ?? thanks in advance ... (1 Reply)
Discussion started by: smartgupta
1 Replies

7. Shell Programming and Scripting

Monitor log file and execute command

I would like to monitor a log file using a shell script and as soon as a line with a certain string in it appears I would like to run a program. I have been playing around with doing this using tail -f, but cannot get it to work. I found something similar here:... (1 Reply)
Discussion started by: danielsbrewer
1 Replies

8. UNIX for Dummies Questions & Answers

Tool to monitor user activity

Hello, Does any one knows any tools or method to monitor users all activities on Solaris 8, including command and its result. Similar to 'script' ??? Thanks nana (3 Replies)
Discussion started by: nana
3 Replies

9. UNIX for Dummies Questions & Answers

filesystem monitor, for unprivileged user

how can i, ordinary, not a privileged user, monitor my part of filesystem ($HOME dir), to see (at least in log) when and which files was created/deleted/moved ? (I heard something abound "sandbox", but i don`t need to restrict applications, i just want to log its actions) p.s. my system is... (0 Replies)
Discussion started by: variety
0 Replies

10. Shell Programming and Scripting

User Login Monitor Script

I need some help writing a script that I can run as a cron job. I want this script to be able find all the users that have logged on to this machine since the last time the script was run (plan to run daily at 11:30pm, so everyone who logged on that day) and email me who logged on, and when. ... (2 Replies)
Discussion started by: Drewser
2 Replies
Login or Register to Ask a Question