Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-24-2008, 06:36 AM   #1
LQ Newbie
Registered: May 2007
Location: Kathmandu, Nepal
Distribution: Ubuntu 8.04
Posts: 10

Rep: Reputation: 0
where are all the user actions stored?

I have got the following text from my friend. It was all the commands that user performed.

Apr 22 10:34:23 localhost sudo: prabin : TTY=pts/0 ;
PWD=/home/prabin ; USER=ro
ot ; COMMAND=/usr/bin/apt-get update
Apr 22 10:34:46 localhost sudo: prabin : TTY=pts/0 ;
PWD=/home/prabin ; USER=ro
ot ; COMMAND=/usr/bin/apt-get install php
Apr 22 10:34:51 localhost sudo: prabin : TTY=pts/0 ;
PWD=/home/prabin ; USER=ro
ot ; COMMAND=/usr/bin/apt-get install php5
Apr 22 10:37:48 localhost sudo: prabin : TTY=pts/0 ; PWD=/var ;
USER=root ; COM

Where is this information located?
Please reply.

Thanks in advance..
Old 04-24-2008, 07:08 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 658Reputation: 658Reputation: 658Reputation: 658Reputation: 658Reputation: 658
Look in /var/log/messages as root. If you use sudo, the command you enter is logged. This is one of the advantages of using sudo.

Exactly which logfile is written to is determined by your /etc/syslog-ng/syslog-ng.conf configuration file. It could filter sudo messages (sudo is the facility supplying the message) to go to a different log file.
Old 04-24-2008, 10:28 AM   #3
LQ Newbie
Registered: Apr 2008
Location: South Carolina
Distribution: Red Hat, Scientific Linux, CentOS, and Ubuntu
Posts: 27

Rep: Reputation: 13
bash history

If you're using bash as a shell, you can also see a user's history of bash commands in:


It won't give you the date and time information that you're seeing for sudo commands in /var/log/messages, but it will show the commands the user entered.

To see the history for the user you are logged in as, use this command:



configuration, logfile, user

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
permissions on samba change on specific user actions javeree Linux - Server 1 03-01-2007 04:43 AM
Where are thin client user video resolution settings stored on server? Phoenixink Linux - Server 1 02-22-2007 06:25 AM
central stored user login tourbike Linux - Networking 2 01-19-2007 04:04 AM
where are user email addresses stored? haimeltjnfg Linux - Software 2 04-04-2005 02:37 PM
Capturing User Actions chakkerz Linux - Software 4 05-16-2004 10:04 PM

All times are GMT -5. The time now is 09:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration