• A talk to kedar.nitty-witty
  • About both of us
  • Copyright
  • Search
  • MySQL Resources
..::CHANGE is INEVITABLE::.. Kedar's Blog for MySQL and more
  • General
  • Just for fun
  • Review
  • Technical
  • MySQL
  • Guest Posts
  • Personal
  • Software
  • RSS Feed
  • Twitter

Audit-Checking login history-to know WHO DID THAT on Redhat Linux

By
Kedar
– February 16, 2010
DiggDeliciousLinkedInRedditStumbleUponPrintMore...

I’m using Redhat Linux (RHEL 5). Yesterday I saw a bit suspicious activities and data movements under my “home” (/home/username directory).
I thought of investigate / audit through my Redhat linux machine and catch the “Right Person” / “Who did it”.

Following are the steps I followed: [which if you follow, you may follow.]

1. Retrieve all successful logins on the system

cat /var/log/secure* | grep Accepted > logins.txt
Now logins.txt will contain all successfull logins to you Redhat linux system.
You may go through the file and have a manual first look up.

[ad#ad-2-250x250img]

2. Check users at perticular time

Other command to find out last login details of perticular users we have last, lastb commands which shows listing of last logged in users.

The last program, which prints a detailed report of the times of the most recent user logins, does so by scanning the /var/log/wtmp file.

Output includes following details:

User name
Tty device number
Login date and time
Logout time
Total working time

It also has an option to search logins at perticular time as follows:
last -t YYYYMMDDHHMMSS – Display the state of logins as of the specified time.

Files used in this are:
/etc/utmp – This is a binary file that contains a record for every active tty line.
/var/adm/wtmp – Keeps track of both logins and logouts.

3. finger – It’s a user information lookup program

Finally you can get more information about user with the finger command.

finger -ls user-id – Above command will tell you linux user’s login name, real name, terminal name, write status, home directory, home phone number, login shell, mail status, and the contents of the files .plan .project .pgpkey .forward

So, ultimately I got the Right Person and later came to know he was in my “home” to do “right” tasks only.
I don’t know if any other way is available but this is one of the way I approched.

DiggDeliciousLinkedInRedditStumbleUponPrintMore...

You might also like::

  1. My Google Exploitation – Web History Graphs 2009
  2. Linux Shell Commands – quick how-tos
  3. MySQL Memory Usage Limits on 32 bit Linux
  4. crontab not working with dynamic date filename – rhel linux
  5. Simple Shell Script to Monitoring Disk Space on a Linux Machine
Tags: Audit Linux, linux, login history, Technical, Who did that, who logged in

No Comments

Start the ball rolling by posting a comment on this article!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

CAPTCHA Image
CAPTCHA Audio
Refresh Image

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Daily Popular
    • Load Delimited Data (csv, excel) into MySQL Server
    • Xtreme Movie Review: Agneepath Agneepath Agneepath (2012)
    • 10 Steps: MySQL Monitoring through Nagios: Install & Configure
    • JaxtrSMS-Send Free SMS Worldwide | Download for iPhone, Android, BlackBerry, Java
    • Place to visit Mumbai: Alibaug 1-2 day tour weekend picnic
    • Using LOAD DATA INFILE with Stored Procedure Workaround-MySQL
    • Selected Oscar Wilde Quotes
    • The Dos Chat – Lan Messenger
    • Gulaal movie – music and lyrics
    • No More Spool Space Teradata Query Solution
  • Also Visit:

    My Photography
    My Quotes
    My Funny Pics

  • Register / Login
    • Register
    • Log in
  • Recent Comments
    • Kedar on Xtreme Movie Review: Agneepath Agneepath Agneepath (2012)
    • subho on Xtreme Movie Review: Agneepath Agneepath Agneepath (2012)
    • R. Willis on MySQL Stored procedure to Generate-Extract Insert Statement
    • Kedar on JaxtrSMS-Send Free SMS Worldwide | Download for iPhone, Android, BlackBerry, Java
    • mē on JaxtrSMS-Send Free SMS Worldwide | Download for iPhone, Android, BlackBerry, Java

..::CHANGE is INEVITABLE::... All Rights Reserved.