LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-24-2004, 03:37 AM   #1
suchi_s
Member
 
Registered: May 2004
Posts: 133

Rep: Reputation: 15
keep track of all the commnads fired by all users.. after shutdown once


history gives the list of all the commands.. but without the user name specified..
how can we see the commands fired by different users on a particular day.
 
Old 11-24-2004, 05:08 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,788

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
With what goal ?
With the user cooperation or not ?

bash history file is one way to do it, but can easily be circumvented by the user himself, or .logout file erasing the file.
Commands launched from something different than the shell would be missed too.

Stronger alternatives could use process accounting (Solaris & Linux), or a Dtrace exec logging script under Solaris 10.
 
Old 11-24-2004, 05:42 AM   #3
suchi_s
Member
 
Registered: May 2004
Posts: 133

Original Poster
Rep: Reputation: 15
i want to know if any of the user has fired a command using root priveledgse..
last commands fired unkowingly by some user
 
Old 11-24-2004, 06:09 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,788

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Not sure about how you can determine if a user unknowingly execute a command or not, but process accounting is an answer again.

With process accounting enabled, lastcomm will show you the command under root privileges with an S indicator.
 
Old 11-24-2004, 06:44 AM   #5
suchi_s
Member
 
Registered: May 2004
Posts: 133

Original Poster
Rep: Reputation: 15
lastcomm does not work.. how to enable process acoounting
 
Old 11-24-2004, 08:41 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,788

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
lastcomm works, but as I already wrote, you have to enable process accounting first.

To do it, you need to make sure the needed package(s) are installed, and that depends on your distribution / O/S.

Then "man accton" and google search will help you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Users can't shutdown in KDE duffmckagan Debian 1 10-20-2005 10:45 PM
So i got fired today :( NicoR General 6 08-16-2005 01:51 AM
Users unable to use shutdown Jskill007 Slackware 3 09-15-2004 02:54 AM
Sendmail Error: PLEASE HELP BEFORE I GET FIRED!!! cartfanatic39 Linux - Networking 6 09-09-2003 03:54 PM
allow users to shutdown plisken Linux - General 1 02-06-2002 12:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration