LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-08-2009, 08:15 AM   #1
planetmars
LQ Newbie
 
Registered: Nov 2008
Posts: 22

Rep: Reputation: 15
How to disable lastlog file in /var/log


whenever some one logs in to the RHEL 4 server, his details are put in this lastlog file. Are there any other files that keep the info about logins (either successful or failed attempts) ?

How to stop lastlog file getting updated with the user id every time someone logs in ?
 
Old 10-08-2009, 09:00 AM   #2
Doculus
LQ Newbie
 
Registered: Oct 2009
Distribution: Gentoo
Posts: 29

Rep: Reputation: 17
There is two ways to do it, depending on distro release, you shuld check yours, as I don not have it:
- the old method is in /etc/login.defs, comment "LASTLOG_ENAB"
- the new method is in /etc/pam.d/login, comment "session optional pam_lastlog.so"
 
Old 10-08-2009, 06:20 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Why would you want to disable it?
 
Old 10-08-2009, 08:33 PM   #4
planetmars
LQ Newbie
 
Registered: Nov 2008
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Doculus View Post
There is two ways to do it, depending on distro release, you shuld check yours, as I don not have it:
- the old method is in /etc/login.defs, comment "LASTLOG_ENAB"
- the new method is in /etc/pam.d/login, comment "session optional pam_lastlog.so"
Thanks
 
Old 10-09-2009, 10:03 PM   #5
planetmars
LQ Newbie
 
Registered: Nov 2008
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Doculus View Post
There is two ways to do it, depending on distro release, you shuld check yours, as I don not have it:
- the old method is in /etc/login.defs, comment "LASTLOG_ENAB"
- the new method is in /etc/pam.d/login, comment "session optional pam_lastlog.so"
There is no line containing "LASTLOG_ENAB" in the file login.defs
There is no line containing "session optional pam_lastlog.so" in the file login

I found the following commands that display the previous login details

last
lastb
lastcomm
lastlog

These commands get the data from
var/log/btmp
var/run/utmp
var/log/wtmp

how to disable the process that writes the IP addr of the person who logs in ?
 
Old 10-09-2009, 11:52 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
And again the question: why?

That's a very basic sanity check, and a fundamental auditing feature. Turning that off
is like removing the hand-break from your car.

The only "reason" I can think of for wanting to disable that is that you want to open
back-doors for people. Not a good reason.


Cheers,
Tink
 
  


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
setting file permissions for file /var/log/Xorg.0.log mfb Linux - Security 1 07-07-2009 01:41 PM
/var/log/lastlog 400G - on a 300G filesystem!! bagpussnz Linux - Server 4 01-09-2009 01:42 AM
Can Samhain log my entries in /var/log/secure and /var/log/mesage to a central server abefroman Linux - Software 2 04-13-2008 04:13 PM
/var/log/lastlog missing zQUEz Linux - Server 2 08-08-2007 07:38 PM
/var/log/lastlog size ??? nabil Linux - General 0 10-09-2002 06:04 PM

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

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