Capture user imput commands


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Capture user imput commands
# 1  
Old 02-22-2006
Capture user imput commands

Hi all,
I have a problem which needs to be solved soon because it affects auditing capabilities.
There is an application id that has to be used by other users for the purpose of production support.
The application user id uses C shell.
We allow users to switch to the application user id based on a netgroup and allow them to work as the application id.
But in order to enable auditing,at the end of a session - when the person logs out the session's history information is captured in a file and this is specified in the .logout file for the id.
But here's where the problem comes in.
When a session is improperly terminated,the session's history information is not captured.
And when the session times out due to inactivity also the history information is not captured.
Is there any way I could get the logs in the above two cases?
Using the script command is not allowed in this case and we have to work with the login shell as csh only.


Thanks.
Saran
# 2  
Old 03-21-2006
User input from .logout

I would suggest just relogging in with the same user id. That should result in the history commands being available as per the pre-logout state.

The second issue of the SHELL timing out is a curious one. I suggest resetting the environment "TMOUT" to zero "0". After you reset the TMOUT variable and export it the SHELL should no longer suffer through an unpredictable timeout.

Good luck!
Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Login to remote machine pass commands and capture all in a file

Dear user/friends, After a long gap of 6 years i am back to this forum to find a solution and i hope i will get a solution or atleast a workaround for the problem:p Following is my task which i am trying for almost 3 days without any success. 1) run this command from my terminal (note i... (7 Replies)
Discussion started by: imas
7 Replies

2. Emergency UNIX and Linux Support

A way to capture the user list

Can someone please help me with a way to generate a user list on a system along with the group to which the id belongs? (8 Replies)
Discussion started by: ggayathri
8 Replies

3. Shell Programming and Scripting

Creating new users using a text file as imput (using only shell script and/or awk)

I need somebody who could help with an exercise. You have a text file called users.txt with this info inside: users.txt: user1:1234:/home/homedir1 ; user2:1234:/home/homedir2 ; user3:1234:/home/homedir3 ; user4:1234:/home/homedir4 ; The script should create an user using the... (2 Replies)
Discussion started by: marcosruiz
2 Replies

4. HP-UX

How capture all user command line output?

Hi I want to know how capture all user command line output and save this commands and outputs to text files? if you have script for this subject please give me.:o please help me thank you (6 Replies)
Discussion started by: amvhd
6 Replies

5. Shell Programming and Scripting

Reading ls -l output line by line awk the user name and su user to run commands

Using ksh on AIX what I am trying to do is to read the ls -l output from a file in a do while loop line by line. Extract the user name(3rd field) and the directory/file name(9th field) using awk and save them into variables. su -c to the user and change directory/file permisions to 777. Script I... (13 Replies)
Discussion started by: zubairom
13 Replies

6. Shell Programming and Scripting

Script to retry FTP commands if unsuccessful and capture the failure status code.

I am using the below code to ftp file onto another server FTP_LOG_FILE=${CURR_PRG_NAME}- ${FTP_FILE}-`date +%Y%m%d%H%M%S`.log ftp -ivn ${FTP_HOST} ${FTP_PORT} << ENDFTP >> ${EDI_LOG_DIR}/${FTP_LOG_FILE} 2>&1 user ${FTP_USER} ${FTP_PSWD} lcd... (2 Replies)
Discussion started by: akashdeepak
2 Replies

7. UNIX for Dummies Questions & Answers

user defined commands

Hi, i would like to create user defined commands. e,g: if an user executes , mkdircd test then a directory called test should be created and it should be cd to test. How i can create the command mkdircd with below action: mkdir $1 && cd $1. Please help me in achieving this (7 Replies)
Discussion started by: pandeesh
7 Replies

8. Shell Programming and Scripting

Capture the original user

in our environment role ids are created in unix to which user does su. say my individual id is drout and a role is devid. i will login to drout the su - devid password : <nothing > password less role id then i will login to devid. can i write a function and pass it in a script while i... (4 Replies)
Discussion started by: dr46014
4 Replies

9. Shell Programming and Scripting

Capture commands in unix SunOS

Hi, I would like to capture commands on Unix SunOS. I am aware of script utility but the problem is Script utility writes to file after a sizeable chunk of data. I need to access each command as they are typed, Is it possible in Unix..? Thx (1 Reply)
Discussion started by: raj_paps
1 Replies

10. UNIX for Advanced & Expert Users

Capture of all commands issued by the user “root”

I have to write a script (not C based) that allows to capture of all commands issued by the user “root”. First, I tried to monitor the .bash_history but the commands are written in chunk after the .bash_history is closed. How can I capture the commands in Real-Time without waiting root to... (4 Replies)
Discussion started by: elieifrah@gmail
4 Replies
Login or Register to Ask a Question