RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 696731 - display failed login attempts
Summary: display failed login attempts
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: util-linux-ng
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On: 744245
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-14 18:07 UTC by Steve Grubb
Modified: 2011-12-06 17:10 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 17:10:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1691 0 normal SHIPPED_LIVE Low: util-linux-ng security, bug fix, and enhancement update 2011-12-06 01:02:36 UTC

Description Steve Grubb 2011-04-14 18:07:00 UTC
Description of problem:
NISPOM and FISMA among other standards ask for number of failed login attempts to be displayed after successful login. We should stream line the way that this is done.

Additionally, we would like to be able to direct agetty->login to use a remote pam profile rather than login through configuration in inittab. IOW, we would want the -h parameter in agetty to be passed to login -h which can then use remote.

Comment 5 Tomas Mraz 2011-08-04 11:48:39 UTC
My proposal for the solution is:

1. Do not do the printout of the Last login:..... message in the login code if /etc/hushlogin file is present.
2. Document the possibility to modify the PAM configuration for login so that the following line is added.
session required pam_lastlog.so noupdate showfailed

This allows us to not modify the login behavior for existing installs. And the customers that need to have the message about failed login attempts displayed can add the hushlogin file and modify the PAM configuration according to the documentation.

Comment 6 Karel Zak 2011-08-04 12:21:45 UTC
I agree with Tom's proposal. 

All we need is to add support for /etc/hushlogin to login(1). That's trivial change.

Comment 11 Karel Volný 2011-10-07 15:20:39 UTC
(In reply to comment #5)
> 2. Document the possibility to modify the PAM configuration for login so that
> the following line is added.
> session required pam_lastlog.so noupdate showfailed

there is a little problem with this ... when present without /etc/hushlogins or
~/.hushlogin, the "Last login" message is printed twice

the question is, are we okay with such behaviour?

Comment 12 Karel Zak 2011-10-07 15:32:25 UTC
(In reply to comment #11)
> (In reply to comment #5)
> > 2. Document the possibility to modify the PAM configuration for login so that
> > the following line is added.
> > session required pam_lastlog.so noupdate showfailed
> 
> there is a little problem with this ... when present without /etc/hushlogins or
> ~/.hushlogin, the "Last login" message is printed twice

This is exactly reason why "/etc/hushlogins" has been added ;-) If you want to print the messages by PAM then you have to switch login(1) to hushed mode (by the hushlogin file).

> the question is, are we okay with such behaviour?

Yes.

Comment 13 Karel Volný 2011-10-11 08:28:52 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #5)
> > > 2. Document the possibility to modify the PAM configuration for login so that
> > > the following line is added.
> > > session required pam_lastlog.so noupdate showfailed
> > 
> > there is a little problem with this ... when present without /etc/hushlogins or
> > ~/.hushlogin, the "Last login" message is printed twice
> 
> This is exactly reason why "/etc/hushlogins" has been added ;-) If you want to
> print the messages by PAM then you have to switch login(1) to hushed mode (by
> the hushlogin file).

"If you want to print the messages by PAM then ..." - I read this as "If you want to print the messages *only* by PAM then ..."

but the problem is that 'hushlogin' feature disables also MOTD, while PAM doesn't care about MOTD

> > the question is, are we okay with such behaviour?
> 
> Yes.

ok, twice is better than never :-)

so, I can switch this to VERIFIED once bug #744245 is resolved

Comment 15 errata-xmlrpc 2011-12-06 17:10:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1691.html


Note You need to log in before you can comment on or make changes to this bug.