# Ensure System Accounts Are Secured

- Source: https://support.icompaas.com/support/solutions/articles/62000235476-ensure-system-accounts-are-secured
- 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 2

**Description:**  
 System accounts are accounts used by services and system processes. Securing these accounts by disabling login, setting appropriate shells, and managing passwords prevents unauthorized access and reduces security risks.

**Rationale:** Securing system accounts limits attack vectors that exploit unattended or poorly configured accounts, thereby enhancing overall system security.

**Impact:** Pros:

-   Reduces risk of privilege escalation and unauthorized access.  
    
-   Supports compliance with security policies.  
    

Cons:

-   May affect service functionality if accounts are incorrectly disabled.  
    

**Default Value:** Some system accounts may allow login or have weak configurations by default.

**Pre-requisites:**

-   Root or sudo privileges to modify user accounts.  
    

**Remediation:**

### **Test Plan:**

**Using Linux command line:**

1.  List system accounts with valid shells or login access:  
    
    awk -F: '($3 < 1000) {print $1, $7}' /etc/passwd | grep -v '/sbin/nologin\\|/bin/false'
    
2.  Identify any system accounts with shell access that should be disabled.  
    

### **Implementation Plan:**

**Using Linux command line:**

1\. Disable login for system accounts not requiring it by setting shell to /sbin/nologin or /bin/false:  

usermod -s /sbin/nologin <system\_account>

2\. Lock passwords for system accounts as appropriate:  

passwd -l <system\_account>

3\. Verify changes:  

grep <system\_account> /etc/passwd

### **Backout Plan:**

**Using Linux command line:**

1.  Re-enable login shells or unlock passwords if required:  
    
    usermod -s /bin/bash <system\_account>
    passwd -u <system\_account>
    
2.  Verify functionality and access.  
    

**References:**

-   CIS Amazon Linux 2 Benchmark v3.0.0  
    
-   Linux passwd Manual  
    
-   [NIST SP 800-53 Revision 5 - AC-2  
    ](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final#ac-2)

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