public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Tomas Mraz <tmraz@redhat.com>
To: "Steve M. Zak" <smzak@faac.com>
Cc: "linux-audit@redhat.com" <linux-audit@redhat.com>
Subject: RE: Lockout record
Date: Fri, 03 Dec 2010 09:20:00 +0100	[thread overview]
Message-ID: <1291364400.15535.86.camel@vespa.frost.loc> (raw)
In-Reply-To: <E2B97F4E65AFD84DA1A7B3BEC35E17140149E6A2389D@hailstorm.faac.com>

On Thu, 2010-12-02 at 17:46 -0500, Steve M. Zak wrote: 
> Hi Steve,
> 
> Thanks for the info! I do see the USER_AUTH events which I didn't know
> about so thanks. 
> 
> I may have something mis-configured, but for instance in my pam.d/sshd
> file I have deny=5
> 
> I can see the 5 failed attempts as type=USER_AUTH with res=failed, but
> the RESP_ACCT_LOCK doesn't show up until the 6th login attempt and a
> message gets displayed to the user "Your account is locked. Maximum
> amount of failed attempts was reached."
> 
> Does a lock event get written to the audit.log on the 5th attempt? (I
> didn't see RESP_ACCT_LOCK_TIMED in the log). A Red Hat KB article and
> Tech Support indicates that the lock happens at deny=n + 1, but it
> seems to happen at deny=n. The lock event seems to get recorded at
> deny=n + 1. 

You are right. The event is recorded only when the user attempts to log
in after the deny=n failed attempts already happened. This is caused by
the way pam_tally2 is set up in the PAM stack. The module cannot know if
the n-th attempt is failed or not or more exactly said - the module is
called only before the authentication in case of failed authentication.
And so it cannot record the lock event earlier than during another
authentication attempt for the user.
-- 
Tomas Mraz
No matter how far down the wrong road you've gone, turn back.
                                              Turkish proverb

  reply	other threads:[~2010-12-03  8:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-01 20:01 Lockout record Steve M. Zak
2010-12-01 21:16 ` Steve Grubb
2010-12-02 22:46   ` Steve M. Zak
2010-12-03  8:20     ` Tomas Mraz [this message]
2010-12-03 14:54       ` Wieprecht, Karen M.
2010-12-03 15:13         ` Steve M. Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1291364400.15535.86.camel@vespa.frost.loc \
    --to=tmraz@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=smzak@faac.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox