LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-24-2007, 11:48 PM   #1
Atif_Khan
Member
 
Registered: Sep 2004
Distribution: CentOS, Slackware, Solaris, Ubuntu
Posts: 66

Rep: Reputation: 15
history question


Dear friends,

How to know which commands has been run by a specific user. I tried history but it doesnt seem to have that option to tell me which user has executed what commands. I know I can see user history by using .bash_history command but I dont get to know which day/time they executed those commands.

Waiting for replies.

Last edited by Atif_Khan; 01-24-2007 at 11:59 PM.
 
Old 01-25-2007, 12:05 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The bash shell saves a history file, but it will retain only unique commands. It is meant for the history features of the shell such as using "[CTRL]-r" to recall certain commands or ! to rerun the last command.

If the commands were called using sudo, such as "sudo /sbin/ifconfig", then there will be log entries of the command, possibly in /var/log/messages, but possibly in a different log depending on how your system is configured. If the user can use 'su -' or use 'sudo /bin/bash' or 'sudo vim' and uses the ":!" shell escape, then commands executed from that shell won't be logged.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
history junaid18183 Linux - General 14 11-07-2009 07:01 AM
Download history and copy history? inverted.gravity Linux - Newbie 1 02-21-2006 12:31 PM
How to find back "history" database after "history -c" ? san_lss Linux - Newbie 1 01-07-2004 11:53 AM
mozilla/netscap history file related question.. beautifulmind Linux - Software 0 07-17-2002 08:48 AM
question about history file on several konsole? doublefailure Linux - General 1 04-08-2002 03:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:43 PM.

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