# Ensure Password Complexity Is Configured

- Source: https://support.icompaas.com/support/solutions/articles/62000235455-ensure-password-complexity-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:**  
 Password complexity requirements enforce the use of varied character types—such as uppercase letters, lowercase letters, numbers, and special characters—in user passwords. Proper configuration strengthens passwords against guessing and brute-force attacks.

**Rationale:** Enforcing complexity reduces the likelihood of simple or easily guessable passwords, enhancing overall system security and compliance with security standards.

**Impact:** Pros:

-   Increases password strength and resistance to attacks.  
    
-   Supports compliance with organizational and regulatory policies.  
    

Cons:

-   May increase user difficulty in remembering passwords.  
    
-   Overly complex requirements may lead to insecure workarounds (e.g., writing down passwords).  
    

**Default Value:** Password complexity is often not enforced by default and requires explicit configuration.

**Pre-requisites:**

-   Root or sudo privileges to configure password complexity modules and policies.  
    

**Remediation:**

### **Test Plan:**

**Using Linux command line:**

1.  Review password complexity settings in PAM configuration files (e.g., /etc/pam.d/system-auth, /etc/pam.d/password-auth) for modules like pam\_pwquality or pam\_cracklib:  
    
    grep pam\_pwquality /etc/pam.d/system-auth /etc/pam.d/password-auth
    
2.  Check /etc/security/pwquality.conf or relevant configuration files for complexity parameters such as minclass, minlen, dcredit, ucredit, and ocredit.  
    

### **Implementation Plan:**

**Using Linux command line:**

1.  Configure password complexity by editing /etc/security/pwquality.conf and setting parameters, for example:  
    
    minlen = 12  
    minclass = 4  
    dcredit = -1  
    ucredit = -1  
    ocredit = -1  
    lcredit = -1
    
2.  Ensure PAM modules like pam\_pwquality are enabled in the relevant PAM configuration files.
    

### **Backout Plan:**

**Using Linux command line:**

1.  Adjust or remove complexity parameters if needed.  
    
2.  Test password change and creation processes for usability.  
    

**References:**

-   CIS Amazon Linux 2 Benchmark v3.0.0  
    
-   pam\_pwquality 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.
