Sponsored Content
Full Discussion: User History and commnad log
Top Forums UNIX for Dummies Questions & Answers User History and commnad log Post 302166120 by otheus on Monday 11th of February 2008 03:01:28 AM
Old 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

How to delete history for a particular user

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

How to access all user history file

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

User History

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

access user history as root

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

Command History for a user with IP details

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

History to Another file [local user history , but root access]

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

command history of a particular user in a multiuser environment

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

History to Another file [local user history , but root access]

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
lastcomm(1)							   User Commands						       lastcomm(1)

NAME
lastcomm - display the last commands executed, in reverse order SYNOPSIS
lastcomm [-f file] [-x] [command-name] ... [user-name] ... [terminal-name] ... DESCRIPTION
The lastcomm command gives information on previously executed commands. lastcomm with no arguments displays information about all the com- mands recorded during the current accounting file's lifetime. If called with arguments, lastcomm only displays accounting entries with a matching command-name, user-name, or terminal-name. If extended process accounting is active (see acctadm(1M)) and is recording the appro- priate data items, lastcomm attempts to take data from the current extended process accounting file. If standard process accounting is active, lastcomm takes data from the current standard accounting file (see acct(2)). If terminal-name is `- -', there was no controlling TTY for the process. The process was probably executed during boot time. If terminal- name is `??', the controlling TTY could not be decoded into a printable name. For each process entry, lastcomm displays the following items of information: o The command name under which the process was called. o One or more flags indicating special information about the process. The flags have the following meanings: F The process performed a fork but not an exec. S The process ran as a set-user-id program. o The name of the user who ran the process. o The terminal which the user was logged in on at the time (if applicable). o The amount of CPU time used by the process (in seconds). o The date and time the process exited. OPTIONS
The following options are supported: -f file Uses file as the source of accounting data. file may be either an extended process accounting file or a standard process accounting file. -x Uses the currently active extended process accounting file. If extended processing accounting is inactive, no output will be produced. EXAMPLES
Example 1 Listing executions of named commands The command example% lastcomm a.out root term/01 produces a listing of all the executions of commands named a.out by user root while using the terminal term/01. Example 2 Listing all user commands The command example% lastcomm root produces a listing of all the commands executed by user root. FILES
/var/adm/pacct standard accounting file /var/adm/exacct/proc extended accounting file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ SEE ALSO
last(1), acctadm(1M), acct(2), acct.h(3HEAD), sigvec(3UCB), core(4), attributes(5) SunOS 5.11 10 Jan 2000 lastcomm(1)
All times are GMT -4. The time now is 08:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy