LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-10-2012, 01:02 PM   #1
gacanepa
Member
 
Registered: May 2012
Location: San Luis, Argentina
Distribution: Debian
Posts: 203

Rep: Reputation: 26
Log user login/logout and activity


What should I look into to achieve the following? (maybe a bash script?)
1) Save in a log file info.txt:
"User johndoe has logged on at xx:xx on (date)"
2) Then append the following:
"User johndoe has executed the following commands:"
3) Finally:
"User johndoe has logged out at xx:xx on(date)".

I've checked this link, which seems pretty close to what I want... Any suggestions will be more than welcome!
 
Old 09-10-2012, 03:06 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,104

Rep: Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515Reputation: 1515
I didn't read over the link you provided, so apologies if my answer overlaps the link's information.

'auditd' is the area that you will want to investigate. From there, you can audit file changes, user commands, etc..
 
1 members found this post helpful.
  


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
[SOLVED] user login logout time GNakul Linux - Newbie 4 06-05-2012 07:13 AM
User activity Log in RHEL 5.2 it_guy Red Hat 9 05-05-2011 06:47 AM
user login activity Spiceyal Linux - Newbie 2 09-18-2010 09:47 PM
notification of user login and logout JudyL Programming 9 08-31-2007 11:47 AM
Which files contain individual user login / logout commands andrewstr Red Hat 5 12-17-2003 06:34 PM


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