02-21-2005
audit user activity - possible?
Hi,
I have been asked if it is possible to track the last time a specific user logged in to the sysetm.
checked my documentation but can't see it there - google is not being very helpful either.
I wonder if someone here can help - it will be much appreciated.
Thanks
Suresh
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Does anybody know how to force a user to automatically logoff a UNIX session if there is no keyboard activity for a period of time? We use COBOL and there is a BEFORE TIME option on the ACCEPT command, however, we do not want to change the many programs we have to detect this.
What we really... (3 Replies)
Discussion started by: MarkN
3 Replies
2. UNIX for Advanced & Expert Users
Hello,
I administer a NetBSD (1.6.2) server that receives remote logins over telnet with users running Csh. I wish to be able to occasionally bring up exactly what these users are doing. Echoing their consoles to mine would be ideal, but I cannot find any information on how this would be... (1 Reply)
Discussion started by: dangerousbeans
1 Replies
3. UNIX for Dummies Questions & Answers
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
4. UNIX for Advanced & Expert Users
hi
I want to know how to save all the command used by all the used under a particular root with the time stamp in a file.
Eg:
User Name: UX10
Time: 10:56
Command: LS
User Name: UX23
Time: 10:59
Command: MORE abc.txt
-Anand (2 Replies)
Discussion started by: anandtharani
2 Replies
5. AIX
Is there a tool or application the will audit users activity? I've tryed to use audit the comes with AIX but to gathers so much information it is near impossible to see what they are doing. I just want to monitor logins and and files they create or change. (9 Replies)
Discussion started by: daveisme
9 Replies
6. Shell Programming and Scripting
Hi there,
I'm looking for some help to get a little script done that shows me (or counts) only the added lines from an SVN repository of one specific user. Anybody has an idea?
Thanks, Michael (0 Replies)
Discussion started by: MichaelGiese
0 Replies
7. UNIX for Dummies Questions & Answers
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
8. Shell Programming and Scripting
Need some help in coming up to log all the activity that is used with our common "unix account".
Ideally I am looking for to log the activity in a "separate" file for each session or login until the user logout, I would like to capture the date/time and terminal login and record all the ... (3 Replies)
Discussion started by: rajmanna
3 Replies
9. UNIX for Dummies Questions & Answers
Hi All
Please can you help me with the following issue:
A certain vendor installed an application in which for a user to log in; the user must use a user created/predefined by the application. And because this application has more than one user its difficult to track who did what and when,... (6 Replies)
Discussion started by: fretagi
6 Replies
10. UNIX for Advanced & Expert Users
Hi All
We have a job which writes files to a server at a particular time. The files will be created by a particular user ID
Today, during the execution of the job, it created a file to the server and the file sat on the server for sometime, but was deleted immediately at the end of the... (4 Replies)
Discussion started by: sparks
4 Replies
LEARN ABOUT X11R4
setauid
getauid(2) getauid(2)
NAME
getauid, setauid - get or set user audit identity
SYNOPSIS
cc [ flag ... ] file ... -lbsm -lsocket -lnsl [ library ... ]
#include <sys/param.h>
#include <bsm/libbsm.h>
int getauid(au_id_t *auid);
int setauid(au_id_t *auid);
The getauid() function returns the audit user ID for the current process. This value is initially set at login time and inherited by all
child processes. This value does not change when the real/effective user IDs change, so it can be used to identify the logged-in user even
when running a setuid program. The audit user ID governs audit decisions for a process.
The setauid() function sets the audit user ID for the current process.
Upon successful completion, the getauid() function returns the audit user ID of the current process on success. Otherwise, it returns -1
and sets errno to indicate the error.
Upon successful completion the setauid() function returns 0. Otherwise, -1 is returned and errno is set to indicate the error.
The getauid() and setauid() functions will fail if:
EFAULT The auid argument points to an invalid address.
EPERM The {PRIV_SYS_AUDIT} privilege is not asserted in the effective set of the calling process.
The getauid() function will fail if:
EPERM The {PRIV_PROC_AUDIT} privilege is not asserted in the effective set of the calling process.
USAGE
Only a process with appropriate privileges can successfully execute these calls.
bsmconv(1M), audit(2), getaudit(2), privileges(5)
The functionality described on this manual page is available only if the Basic Security Module (BSM) has been enabled. See bsmconv(1M) for
more information.
These functions have been superseded by getaudit(2) and setaudit().
31 Mar 2005 getauid(2)