LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 12:02 PM   #1
gacanepa
Member
 
Registered: May 2012
Location: San Luis, Argentina
Distribution: Debian
Posts: 205

Rep: Reputation: 27
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, 02:06 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:08 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