When I try to login 3 times with the wrong password (locally), instead of seeing user locked out message:
su - myuser
Account locked due to 3 failed logins
I see this:
[myuser@ip-10-10-2-53 ~]$ su - myuser
Password:
su: Permission denied
[myuser@ip-10-10-2-53 ~]$ su - myuser
Password:
su: Permission denied
[myuser@ip-10-10-2-53 ~]$ su - myuser
Password:
su: Authentication failure
[myuser@ip-10-10-2-53 ~]$ su - myuser
Password:
su: Authentication failure
[myuser@ip-10-10-2-53 ~]$ su - myuser
Password:
su: Authentication failure
[myuser@ip-10-10-2-53 ~]$ su - myuser
Password:
su: Authentication failure
[myuser@ip-10-10-2-53 ~]$ su - myuser
Password:
su: Authentication failure
[myuser@ip-10-10-2-53 ~]$ sudo faillock
myuser:
When Type Source Valid
2018-03-23 21:26:26 TTY pts/1 V
2018-03-23 20:54:01 RHOST 192.168.8.67 I
2018-03-23 20:54:05 RHOST 192.168.8.67 I
2018-03-23 20:58:39 RHOST 192.168.8.67 I
2018-03-23 20:58:41 RHOST 192.168.8.67 I
2018-03-23 21:24:50 TTY pts/1 I
2018-03-23 21:24:56 TTY pts/1 I
2018-03-23 21:26:55 TTY pts/1 V
2018-03-23 21:26:59 TTY pts/1 V
root:
When Type Source Valid
My /etc/pam.d/password-auth
and /etc/pam.d/system-auth
files (they both exactly the same)
#%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_faildelay.so delay=2000000
auth required pam_faillock.so preauth silent audit deny=3 even_deny_root unlock_time=60
auth sufficient pam_unix.so nullok try_first_pass
auth [default=die] pam_faillock.so authfail audit deny=3 even_deny_root unlock_time=60
auth requisite pam_succeed_if.so uid >= 1000 quiet_success
auth required pam_deny.so
account required pam_faillock.so
account required pam_unix.so
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 1000 quiet
account required pam_permit.so
password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password required pam_deny.so
session optional pam_keyinit.so revoke
session required pam_limits.so
-session optional pam_systemd.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so