Bug 696731 - display failed login attempts
display failed login attempts
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: util-linux-ng (Show other bugs)
6.1
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Karel Zak
qe-baseos-daemons
: FutureFeature
Depends On: 744245
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-14 14:07 EDT by Steve Grubb
Modified: 2011-12-06 12:10 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 12:10:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Steve Grubb 2011-04-14 14:07:00 EDT
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 07:48:39 EDT
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 08:21:45 EDT
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 11:20:39 EDT
(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 11:32:25 EDT
(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 04:28:52 EDT
(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 12:10:58 EST
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.