shell command logging


 
Thread Tools Search this Thread
Operating Systems Solaris shell command logging
# 1  
Old 11-27-2008
shell command logging

Does anyone have a simple method of logging all shell commands typed by a user (csh in our case)?

- I could enable auditing, but this would be overkill
- I could enable process accounting, but AFAIK, this does not log arguments

Thanks all.
# 2  
Old 11-27-2008
You could try this:

put theses variables into local environnement file (.cshrc for csh shell) for each users you want to log:

set history=100
set savehist=100

100 is the max of the command that will be logged

To see the history ==> type history command at the user prompt
and the history is also logged into ~/.history file after the user logout the session.

BR,
# 3  
Old 12-04-2008
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to set colorscheme for a shell while/after logging in?

I am trying to put the below in a file .vimrc and sourced the file, however when i vi any file it is not showing/reflecting color scheme i wanted, Is there any way i can make this work? we use common application account to log in and by default it is CSH and later we change the shell to KSH. I want... (3 Replies)
Discussion started by: Ariean
3 Replies

2. UNIX and Linux Applications

Logging in to the GUI from the shell

I have an Ubuntu 12.04 LTS server running GNOME shell,that I occassionly have to remotely access to perform some maintenance. I usually vpnc into the network and then simply use vncviewer to access the Gnome GUI desktop for testing,given that the account is logged in. The other day I had to reboot... (4 Replies)
Discussion started by: metallica1973
4 Replies

3. Shell Programming and Scripting

Command Logging

I searched the forums for command logging and the user "Driver" seemed to provide a script for logging shell commands with related info like date and time. The subject was "logging command invocations -cmdlog" . I would be interested in this script. Thanks (0 Replies)
Discussion started by: starcraft
0 Replies

4. Shell Programming and Scripting

Shell Script for Logging into the Website

Hi ALL, Is there any way, to login into a website using Shell/Perl command/script? I am struggling on this from quite sometime but with no luck. Can you guys help, please? My sole purpose is to login a website (Which requires Username and Password) and then extract some information from... (3 Replies)
Discussion started by: parshant_bvcoe
3 Replies

5. Shell Programming and Scripting

awk command-logging

hi folks, In the following code, logfile remains empty. log_file="/u/Sc/prav.log.$mon$day" ps -ef | grep "myprocess"| awk -v logfile=$log_file '{ system("date >> logfile") }' can u please help as how to log the date to that logfile. thanks in advance! (3 Replies)
Discussion started by: pravfraz
3 Replies

6. Cybersecurity

Full Command Logging?

I am looking for a really good command logging tool to improve the auditing of my servers. I have previously used snoopy but this is currently a bit flaky and causing serious problems for me, it doesn't look like it's been maintained since 2004, it didn't even want to compile until I added -fPIC... (1 Reply)
Discussion started by: humbletech99
1 Replies

7. UNIX for Dummies Questions & Answers

Command Logging in SCO

Hello, new user here. I am the "administrator" for a few SCO Unix servers here, but do not have much Unix administration experience other than some basic stuff (don't ask). Anyway, I have been charged with finding a way to log all users commands for auditing purposes. This includes root. The log... (2 Replies)
Discussion started by: brian_g
2 Replies

8. Shell Programming and Scripting

logging in Shell script

How to I write to a log file all the output that is displaying on the screen? with time stamp. thankx. (3 Replies)
Discussion started by: laila63
3 Replies

9. UNIX for Dummies Questions & Answers

What is command for logging?

Hi, I am trying to recollect the command used to log a file. We use this command just before starting, say, installation. At the end you get a file capturing the series of commands you used during the course of time and sytems response. Could anybody please help. Thanks, Dasa (3 Replies)
Discussion started by: dtamminx
3 Replies

10. UNIX for Advanced & Expert Users

SSH and command logging

Hi all... I've completed the task of deploying SSH over my 400 servers. I don't know if i'm right or wrong, but ssh doesn't do any command-logging, does it? Is there a app i can use to log all commands passed ( besides the usual .sh_history), whith no modification possible by the user, and how... (2 Replies)
Discussion started by: penguin-friend
2 Replies
Login or Register to Ask a Question