# Ensure Password Length Is Configured

- Source: https://support.icompaas.com/support/solutions/articles/62000235454-ensure-password-length-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 a minimum password length enforces users to create passwords of sufficient complexity, improving resistance to brute-force and guessing attacks.

**Rationale:** Longer passwords increase the key space, making passwords harder to crack and enhancing overall system security.

**Impact:** Pros:

-   Strengthens password security by enforcing length requirements.  
    
-   Helps meet compliance and security best practices.  
    

Cons:

-   May cause usability issues if minimum length is set too high.  
    

**Default Value:** Defaults vary; some systems may not enforce a minimum password length.

**Pre-requisites:**

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

**Remediation:**

### **Test Plan:**

**Using Linux command line:**

1\. Check /etc/security/pwquality.conf for minlen parameter:

grep minlen /etc/security/pwquality.conf

2\. Verify the minimum length value is configured.  

### **Implementation Plan:**

**Using Linux command line:**

1.  Edit /etc/security/pwquality.conf to set the minimum length, for example:  
    
    minlen = 12
    
      
    
2.  Save the file.  
    
3.  Confirm PAM is configured to use pam\_pwquality.  
    

### **Backout Plan:**

**Using Linux command line:**

1.  Remove or adjust the minlen setting if needed.
    
2.  Test password changes to confirm behavior.  
    

**References:**

-   CIS Amazon Linux 2 Benchmark v3.0.0  
    
-   pwquality.conf Manual  
    
-   [NIST SP 800-63B - Digital Identity Guidelines  
    ](https://pages.nist.gov/800-63-3/sp800-63b.html)

## 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.
