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
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
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
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
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
4. UNIX for Dummies Questions & Answers
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
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
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
7. HP-UX
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
8. Shell Programming and Scripting
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
9. Emergency UNIX and Linux Support
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
10. Shell Programming and Scripting
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
LEARN ABOUT HPUX
setaudproc
setaudproc(2) System Calls Manual setaudproc(2)
NAME
setaudproc() - controls process level auditing for the current process and its decendents
SYNOPSIS
DESCRIPTION
controls process level auditing for the current process and its decendents. It accomplishes this by setting or clearing the flag in the
area of the calling process. When this flag is set, the system audits the process; when it is cleared, the process is not audited. This
call is restricted to users with the privilege.
One of the following flags must be used for aflag:
Audit the calling process and its decendents.
Do not audit the calling process and its decendents.
The flag is inherited by the descendents of a process. consequently, the effect of a call to is not limited to the current process, but
propagates to all its decendents as well. For example, if is called with the flag, all subsequent audited system calls in the current
process are audited until is called with the flag.
Further, performs its action regardless of whether the user executing the process has been selected to be audited or not. For example, if
is called with the (or the flag, all subsequent audited system calls will be audited (or not audited), regardless of whether the user exe-
cuting the process has been selected for auditing or not.
Due to these features, should not be used in most self-auditing applications. should be used (see audswitch(2)) when the objective is to
suspend auditing within a process without affecting its decendents or overriding the user selection aspect of the auditing system.
Security Restrictions
Some or all of the actions associated with this system call require the privilege. Processes owned by the superuser have this privilege.
Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information about
privileged access on systems that support fine-grained privileges.
RETURN VALUE
Upon successful completion, returns 0; otherwise, it returns -1 and sets to indicate the error.
AUTHOR
was developed by HP.
SEE ALSO
audevent(1M), audusr(1M), audswitch(2), getaudproc(2), audit(5), privileges(5).
setaudproc(2)