The account locking policy is not effective for some users

Solution Verified - Updated -

Issue

  • The account locking policy is not effective for some users, eg uid < 1000.

  • 'pam_succeed_if.so' line is above of 'pam_faillock.so' in /etc/pam.d/system-auth and /etc/pam.d/password-auth:

#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth        required      pam_env.so
auth        required      pam_faillock.so preauth silent audit deny=3 even_deny_root  unlock_time=600 root_unlock_time=60
auth        required      pam_faildelay.so delay=2000000
auth        sufficient    pam_fprintd.so
auth        sufficient    pam_unix.so nullok try_first_pass
auth        requisite     pam_succeed_if.so uid >= 1000 quiet_success   <==========
auth        required      pam_faillock.so authfail audit deny=3 even_deny_root  unlock_time=600 root_unlock_time=60
auth        required      pam_deny.so
...

Environment

  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content