Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-21-2010, 02:41 AM   #1
LQ Newbie
Registered: Jul 2006
Posts: 5
Blog Entries: 1

Rep: Reputation: 0
o/p of History to be logged in diffrent file ONLINE

Dear All,I want to know if there is any process to record the commands executed from CLI to be recorded in a diffrent file ONLINE.Meaning whenever anyone who is executing any command, the same should get recorded in /var/log/histlog online (as an administrator I want to keep a track of the username along with time and tty) from which the command is executed.I may use tail -f /var/log/histlog to check the commands executed online.

I am using the RHEL5 with kernel as 2.6.18
I have used the lastcomm to check that, but donot find it very usefull as it prints extra informations also (not relevent) some commands which are executed internally by the system while loggin in by the user.

Last edited by diptanu; 09-21-2010 at 02:46 AM. Reason: addition of further comments
Old 09-21-2010, 02:45 AM   #2
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296

Have a look at rootsh. I'm sure it'll do just what you need.

Kind regards,

Old 09-21-2010, 03:13 AM   #3
LQ Newbie
Registered: Jul 2006
Posts: 5

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Hi ERic,
If I understand correctly (as I have not installed the same till now), I would like to know (if you have used the same) that if the user (normal user, other than root) works normally (within his home directory without knowing anything that I am keeping a track of him) the commands executed by him will get logged?
because after reading the INSTALL file, I understood that the user has to type "sudo rootsh" (has to change the shell) to root so that i can keep a track.

My requirement is anyuser who need not/should not know anything about the changes will be done from his side.he will not give any extra commands..but the commands will get automatically logged somewhere from where i can keep a track of the same.
The rootsh is the simple concept of anyway executing the command "script <filename>" before starting anywork by the end user.

Please let me know if I am able to make you understand clearly

Last edited by diptanu; 09-21-2010 at 03:29 AM. Reason: report from INSTALl file


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
tcsh: can you save the history from multiple shells to one history file? BrianK General 2 04-23-2009 06:19 AM
How to assign diffrent ip/hostnames to diffrent services koppaspider Linux - General 1 02-10-2006 10:03 PM
Multipel gorups with diffrent permissions on one file symo0009 Linux - General 2 01-26-2006 07:04 PM
Shorewall with ulog for logging to a diffrent file igbe Linux - Software 0 07-24-2004 05:06 PM
Diffrent kind of file sharing sscharbo Linux - Networking 4 04-12-2001 07:06 AM > Forums > Linux Forums > Linux - Software

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

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