02-11-2008
There's another thread on this board about command logging. There's the "rootsh" package (available from sourceforge), but you have to replace selected user's shells. If you're running BSD, the lastcomm package will work if accounting is turned on (apparently). If you're running Solaris, there's an accounting and reporting package there too (see other thread).
8 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi All,
Whenever I log in to my terminal and execute some cmds and then I type "history", I get the list of all the commands that I have executed.
I want to know where is the history been stored (any path location ?)
Secondly,if I want to delete the history or some part of the history, can... (9 Replies)
Discussion started by: shubhranshu
9 Replies
2. UNIX for Advanced & Expert Users
Team ,
using fc command we can get details of our history file .. Is it possible to get the same result for different user from root.. Actually I need to collect all the stuff from select users history file for day to day basis.
thanks in advance .. (2 Replies)
Discussion started by: rgpai9972
2 Replies
3. UNIX for Dummies Questions & Answers
How do I pipe serveral commans that will list only the user ids, sort the output, and remove any duplice name entries for those that have logged in in the past month? Thanks! (1 Reply)
Discussion started by: CasperQuiet
1 Replies
4. Shell Programming and Scripting
Hi,
I need to access a user's command history. However, the dilemma is that he is logged in and so his current history is not yet flushed to .bash_history file which gets flushed when he logs out. Is there a way I can still access his most recent history?
thank you,
S (4 Replies)
Discussion started by: sardare
4 Replies
5. Solaris
Hi
We are sharing our envoirnment with our component teams. the plateform is SunOS 5.8 Generic_117350-41 sun4u sparc SUNW,Sun-Fire-V490.
All team logs in the domain with same user and perform activities.
Now for the system auditing purpose can somebody guide me how can I get the details when... (6 Replies)
Discussion started by: sukhvinder_Tm
6 Replies
6. UNIX for Advanced & Expert Users
Hi all,
My need is :
1. To know who , when , which command used.
2. Local user should not delete this information.
I mean , with an example , i can say
i have a user user1
i need to give all the following permissions to user1, :
a. A specific directory other than his home... (3 Replies)
Discussion started by: linuxadmin
3 Replies
7. Shell Programming and Scripting
Is it possible to find out the history of recently typed in commands of a particular user in a multi user system?
the history command expects a numeric argument with it. is it possible to find out the history o commands of a particular user say John_smith for example? (2 Replies)
Discussion started by: arindamlive
2 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
My need is :
1. To know who , when , which command used.
2. Local user should not delete this information.
I mean , with an example , i can say
i have a user user1
i need to give all the following permissions to user1, :
a. A specific directory other than his home... (1 Reply)
Discussion started by: sriky86
1 Replies
ACCT(2) Linux Programmer's Manual ACCT(2)
NAME
acct - switch process accounting on or off
SYNOPSIS
#include <unistd.h>
int acct(const char *filename);
DESCRIPTION
When called with the name of an existing file as argument, accounting is turned on, records for each terminating process are appended to
filename as it terminates. An argument of NULL causes accounting to be turned off.
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
EACCES Write permission is denied for the specified file.
EACCES The argument filename is not a regular file.
EFAULT filename points outside your accessible address space.
EIO Error writing to the file filename.
EISDIR filename is a directory.
ELOOP Too many symbolic links were encountered in resolving filename.
ENAMETOOLONG
filename was too long.
ENOENT The specified filename does not exist.
ENOMEM Out of memory.
ENOSYS BSD process accounting has not been enabled when the operating system kernel was compiled. The kernel configuration parameter con-
trolling this feature is CONFIG_BSD_PROCESS_ACCT.
ENOTDIR
A component used as a directory in filename is not in fact a directory.
EPERM The calling process has no permission to enable process accounting.
EROFS filename refers to a file on a read-only file system.
EUSERS There are no more free file structures or we ran out of memory.
CONFORMING TO
SVr4 (but not POSIX). SVr4 documents an EBUSY error condition, but no EISDIR or ENOSYS. Also AIX and HPUX document EBUSY (attempt is made
to enable accounting when it is already enabled), as does Solaris (attempt is made to enable accounting using the same file that is cur-
rently being used).
NOTES
No accounting is produced for programs running when a crash occurs. In particular, nonterminating processes are never accounted for.
Linux 2.1.126 1998-11-04 ACCT(2)