# Ensure Default Group for the Root Account Is GID 0

- Source: https://support.icompaas.com/support/solutions/articles/62000235474-ensure-default-group-for-the-root-account-is-gid-0
- 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:**  
 The root account should have a default group with Group ID (GID) 0, typically the root group. Ensuring the root user is assigned to the correct primary group helps maintain proper permission and security boundaries for this privileged account.

**Rationale:** Having the root user’s primary group set to GID 0 enforces expected privilege separation and avoids potential permission misconfigurations that could weaken system security.

**Impact:** Pros:

-   Maintains standard Linux permission model for the root user.  
    
-   Prevents privilege escalation or access control issues.  
    

Cons:

-   Incorrect group assignment can cause system administration issues.  
    

**Default Value:** By default, the root account is assigned to the root group with GID 0.

**Pre-requisites:**

-   Root or sudo privileges to inspect and modify user account settings.  
    

**Remediation:**

### **Test Plan:**

**Using Linux command line:**

1\. Check the root user’s primary group:  

id -gn root

2\. Verify the group name corresponds to GID 0:  

getent group 0

3\. Confirm the root user is part of this group.  

### **Implementation Plan:**

**Using Linux command line:**

1\. If the root user’s primary group is not GID 0, change it using:  

usermod -g 0 root

2\. Verify the change:  

id -gn root

###   
**Backout Plan:**

**Using Linux command line:**

1\. Revert the root user’s primary group if necessary:  

usermod -g <previous\_group> root

2\. Verify the group assignment.  

**References:**

-   CIS Amazon Linux 2 Benchmark v3.0.0  
    
-   Linux usermod Manual

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