LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-07-2006, 02:30 AM   #1
mahabooba
Member
 
Registered: Dec 2005
Posts: 43

Rep: Reputation: 15
How we can record the login failures?


Hi every one,
How we can get the information about failure logins in Linux.

Regards,
Mahaboob
 
Old 02-07-2006, 02:34 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Maybe the file /var/log/faillog is what you are looking for.
 
Old 02-07-2006, 03:39 AM   #3
tizzef
Member
 
Registered: Jan 2005
Location: Nice, France
Distribution: Ubuntu,RHES, Mandriva, RHAS, AIX 4.3.3, 5.2 & 5.3, Debian,Solaris8/10
Posts: 119

Rep: Reputation: 20
Hy

You can have a look to the </var/log/secure> on a redhat box.
A helpfull tool is <lastlog> command.

Cheers
 
Old 02-08-2006, 02:20 AM   #4
mahabooba
Member
 
Registered: Dec 2005
Posts: 43

Original Poster
Rep: Reputation: 15
Hi,
I did not get any information in /var/log/faillog .
and I tried in /var/log/secure also.

And also I tried -- lastlog,faillog.But no use.

Please help me in this regard,

Regads,
Shaik
 
Old 02-08-2006, 03:27 AM   #5
~=gr3p=~
Member
 
Registered: Feb 2005
Location: ~h3av3n~
Distribution: RHEL 4, Fedora Core 3,6,7 Centos 5, Ubuntu 7.04
Posts: 227

Rep: Reputation: 30
on redhat systems:

open the file /etc/pam.d/system-auth and add these entries:

auth required /lib/security/$ISA/pam_tally.so onerr=fail no_magic_root

account required /lib/security/$ISA/pam_tally.so per_user deny=4 no_magic_root reset

save the file then :
# touch /var/log/faillog

now u can monitor failed login attempts and the locked out accounts after the no. of failed attempts has exceeded:

# faillog -u <user name>
 
Old 02-08-2006, 03:49 AM   #6
mahabooba
Member
 
Registered: Dec 2005
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks "~=gr3p=~"

The problem is solved.

Regards,
Shaik
 
Old 02-08-2006, 04:06 AM   #7
mahabooba
Member
 
Registered: Dec 2005
Posts: 43

Original Poster
Rep: Reputation: 15
One more sir,
How can I get the IP-Address of failog.

Regards,
Shaik
 
Old 02-08-2006, 04:59 AM   #8
~=gr3p=~
Member
 
Registered: Feb 2005
Location: ~h3av3n~
Distribution: RHEL 4, Fedora Core 3,6,7 Centos 5, Ubuntu 7.04
Posts: 227

Rep: Reputation: 30
that depends on what service you are using to let others connect to your linux server remotely like for example ssh etc. the solution i posted above is for local logins.
 
  


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
Last login record juno Linux - General 3 07-23-2010 06:59 AM
Failures in apt-get? upchucky Debian 8 12-17-2005 08:01 PM
Unable to record mic-in with SoundBlaster Live! while able to record other sources max76230 Linux - Newbie 2 03-14-2005 04:31 AM
Samba / XP login failures while tring to access shared files (works with win2k) Zero-0-Effect General 2 01-24-2004 09:27 PM
Detecting failures ph33r Linux - Networking 1 05-15-2002 02:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:23 PM.

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