# Ensure Password Expiration Warning Days Is 7 or More

- Source: https://support.icompaas.com/support/solutions/articles/62000235471-ensure-password-expiration-warning-days-is-7-or-more
- 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 password expiration warning period of 7 or more days alerts users in advance before their password expires. This helps users prepare for timely password changes, reducing account lockouts and support requests.

**Rationale:** Providing adequate warning before password expiration improves user experience and supports continuous access while maintaining security through regular password updates.

**Impact:** Pros:

-   Reduces user inconvenience and helpdesk workload.  
    
-   Encourages timely password updates.  
    

Cons:

-   None significant; longer warnings generally improve usability.  
    

**Default Value:** Password expiration warnings may be set to a lower default value or not configured.

**Pre-requisites:**

-   Root or sudo privileges to modify password aging policies.  
    

**Remediation:**

### **Test Plan:**

**Using Linux command line:**

1\. Check the current warning period for password expiration:  

chage -l <username> | grep "Password expires"
chage -l <username> | grep "Password inactive"
chage -l <username> | grep "Warning"

2\. Review /etc/login.defs for default warning days:

grep PASS\_WARN\_AGE /etc/login.defs

###   
**Implementation Plan:**

**Using Linux command line:**

1\. Set the warning period to 7 or more days globally in /etc/login.defs:  

vi /etc/login.defs

2\. Update or add the line:  

PASS\_WARN\_AGE 7

3\. For specific users, update with chage:  

chage -W 7 <username>

4\. Verify the settings:  

chage -l <username>

###   
**Backout Plan:**

**Using Linux command line:**

1.  Decrease the warning period if necessary by modifying /etc/login.defs and/or using chage.  
    
2.  Verify changes take effect.  
    

**References:**

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