You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Adding pam_tally2 to end of files pam.d fail if sufficient is present
To Reproduce
Run playbook/role for 5.3.2 - Ensure lockout for failed password attempts is configured
If sufficient rule are present, they will precede pam_tally2 and counts may not get reset after a successful authentication. This can result in user lockouts.
In our case, this was caused by the fact that we're applying the CIS hardening to a server that has been joined to a FreeIPA domain. I expect servers the use LDAP authentication or kerberos would have similar problems.
Expected behavior
After the change, a successful login should reset a failed login.
Software (please complete the following information):
Ansible Version: 2.12.5
Role/Repo Version 1.0.3
Additional context
I can try to put together a patch in the future. I wanted to make sure I registered the issue first, in case other folks ran into it.
The solution I have is to use run pam-auth-update instead of lineinfile. We can run pam-auth-update --enable tally --force if we provide a file /usr/share/pam-configs/tally with content like:
Describe the bug
Adding pam_tally2 to end of files pam.d fail if sufficient is present
To Reproduce
Run playbook/role for 5.3.2 - Ensure lockout for failed password attempts is configured
If sufficient rule are present, they will precede pam_tally2 and counts may not get reset after a successful authentication. This can result in user lockouts.
In our case, this was caused by the fact that we're applying the CIS hardening to a server that has been joined to a FreeIPA domain. I expect servers the use LDAP authentication or kerberos would have similar problems.
Expected behavior
After the change, a successful login should reset a failed login.
Software (please complete the following information):
Additional context
I can try to put together a patch in the future. I wanted to make sure I registered the issue first, in case other folks ran into it.
The solution I have is to use run
pam-auth-update
instead of lineinfile. We can runpam-auth-update --enable tally --force
if we provide a file /usr/share/pam-configs/tally with content like:The text was updated successfully, but these errors were encountered: