# Ensure Password Failed Attempts Lockout Is Configured

- Source: https://support.icompaas.com/support/solutions/articles/62000235525-ensure-password-failed-attempts-lockout-is-configured
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [CIS Amazon Linux 2 Benchmark v3.0.0](https://support.icompaas.com/support/solutions/62000112696) › [CIS Amazon Linux 2 Benchmarks](https://support.icompaas.com/support/solutions/folders/62000169265)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

Profile Applicability: • Level 1

Description:  
 Configuring account lockout after a specified number of failed password attempts helps prevent brute-force attacks by temporarily disabling accounts that exceed the threshold of unsuccessful logins.

Rationale:  
 Implementing lockout mechanisms reduces the risk of unauthorized access through repeated guessing and enforces stricter authentication controls.

Impact:  
 Pros:

-   Mitigates brute-force and credential stuffing attacks.  
    
-   Protects user accounts by enforcing lockout policies.  
    

Cons:

-   May cause legitimate users to be locked out due to mistyped passwords.  
    

Default Value:  
 Account lockout is often not configured by default and must be explicitly enabled.

Pre-requisites:

-   Root or sudo privileges to configure PAM modules like pam\_faillock.  
    

Remediation:

### Test Plan:

Using Linux command line:

1.  Check PAM configuration for lockout settings (e.g., in /etc/pam.d/system-auth and /etc/pam.d/password-auth):  
    
    grep pam\_faillock /etc/pam.d/system-auth /etc/pam.d/password-auth
    
2.  Verify deny, unlock\_time, and related parameters are set.  
    

### Implementation Plan:

Using Linux command line:

1.  Configure pam\_faillock in PAM configuration files with desired lockout policy, for example:  
    
    auth required pam\_faillock.so preauth silent deny=5 unlock\_time=900  
    auth \[default=die\] pam\_faillock.so authfail deny=5 unlock\_time=900  
    account required pam\_faillock.so
    
2.  Save changes.  
    

### Backout Plan:

Using Linux command line:

1.  Remove or adjust pam\_faillock settings if needed.
    
2.  Test authentication and lockout behavior.  
    

**References:**

-   CIS Amazon Linux 2 Benchmark v3.0.0  
    
-   pam\_faillock Manual  
    
-   [NIST SP 800-53 Revision 5 - AC-7  
    ](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final#ac-7)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
