# Ensure Password Unlock Time Is Configured

- Source: https://support.icompaas.com/support/solutions/articles/62000235526-ensure-password-unlock-time-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 the password unlock time determines how long a user account remains locked after exceeding the failed login attempt threshold. Setting an appropriate unlock time balances security and usability by preventing prolonged denial of access while mitigating brute-force attacks.

Rationale:  
 An effective unlock time limits the window of exposure from repeated failed login attempts while allowing legitimate users to regain access without administrative intervention.

Impact:  
 Pros:

-   Mitigates risks from brute-force attacks.  
    
-   Reduces administrative overhead by enabling automatic unlock.  
    

Cons:

-   Setting too short a time may reduce security effectiveness.  
    
-   Setting too long a time may inconvenience legitimate users.  
    

Default Value:  
 Unlock time is often not configured by default and requires explicit setting.

Pre-requisites:

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

Remediation:

### Test Plan:

Using Linux command line:

1.  Check PAM configuration files for unlock time setting, 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 that unlock\_time parameter is set and reasonable.
    

### Implementation Plan:

Using Linux command line:

1.  Configure pam\_faillock with an appropriate unlock time, 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 to PAM configuration files.  
    

### Backout Plan:

Using Linux command line:

1.  Remove or adjust unlock\_time settings if necessary.
    
2.  Test lockout and unlock 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.
