# Ensure Password Failed Attempts Lockout Includes Root Account

- Source: https://support.icompaas.com/support/solutions/articles/62000235527-ensure-password-failed-attempts-lockout-includes-root-account
- 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 failed attempts lockout to include the root account ensures that even the root user is locked out after a specified number of failed login attempts. This prevents brute-force attacks targeting the most privileged account.

Rationale:  
 Including the root account in lockout policies reduces the risk of unauthorized access and enhances overall system security by protecting the root user from repeated failed login attempts.

Impact:  
 Pros:

-   Enhances security for the root account.  
    
-   Helps prevent brute-force attacks on critical accounts.  
    

Cons:

-   Risk of accidental lockout of the root account if password is forgotten or mistyped.  
    

Default Value:  
 Lockout policies may exclude the root account by default and require explicit configuration to include it.

Pre-requisites:

grep pam\_faillock /etc/pam.d/system-auth /etc/pam.d/password-auth

-   Root or sudo privileges to modify PAM configuration files.  
    

**Remediation:**

### **Test Plan:**

**Using Linux command line:**

1.  Check PAM configuration files (e.g., /etc/pam.d/system-auth, /etc/pam.d/password-auth) for pam\_faillock and the presence of even\_deny\_root option:
2.  Verify that even\_deny\_root is included to enforce lockout on the root account.
    

### Implementation Plan:

Using Linux command line:

1.  Edit PAM configuration files to include even\_deny\_root in pam\_faillock module lines, for example:  
    
    auth required pam\_faillock.so preauth audit silent deny=5 unlock\_time=900 even\_deny\_root
    auth \[default=die\] pam\_faillock.so authfail audit deny=5 unlock\_time=900 even\_deny\_root
    account required pam\_faillock.so
    
2.  Save the changes.  
      
    

### Backout Plan:

Using Linux command line:

1.  Remove the even\_deny\_root option if needed.
    
2.  Test authentication and root access functionality.  
      
    

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.
