How do I display the number of failed login attempts when a user logs in?
Hi,
I have a RHEL 6.2 machine.
I am required by a customer to display the number of failed login attempts to the users account upon his login.
Currently (by default) when the user logs in (SSH) he gets the "Last login: " with the date of the last login.
I could not find where this is configured and how (if at all possible) I can add the # of failed login attempts to the display.
Thanks in advance,
Itamar
Responses
Have you looked at pam_lastlog?
PAM_LASTLOG(8) Linux-PAM Manual PAM_LASTLOG(8)
NAME
pam_lastlog - PAM module to display date of last login
SYNOPSIS
pam_lastlog.so [debug] [silent] [never] [nodate] [nohost] [noterm]
[nowtmp] [noupdate] [showfailed]
DESCRIPTION
pam_lastlog is a PAM module to display a line of information about the
last login of the user. In addition, the module maintains the
/var/log/lastlog file.
Some applications may perform this function themselves. In such cases,
this module is not necessary.
OPTIONS
[...DELETED FOR BREVITY...]
showfailed
Display number of failed login attempts and the date of the last
failed attempt from btmp. The date is not displayed when nodate is
specified.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
