# Ensure Changes to System Administration Scope (sudoers) Are Collected (Automated)

- Source: https://support.icompaas.com/support/solutions/articles/62000235493-ensure-changes-to-system-administration-scope-sudoers-are-collected-automated-
- 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:**

Changes to the sudoers file or system administration scope define who has elevated privileges on the system. Auditing modifications to these files helps track unauthorized or unexpected privilege escalations, which are critical for system security.

### **Rationale:**

Monitoring changes to sudoers ensures accountability and reduces the risk of privilege abuse. Unauthorized changes can lead to system compromise or data breaches.

### **Impact:**

**Pros:**  
Provides traceability of administrative privilege changes  
Supports security incident investigations  
Enhances compliance with least privilege policies

**Cons:**  
May generate additional audit logs requiring review

### **Default Value:**

By default, audit rules may not cover the sudoers file.

### **Pre-requisites:**

-   `auditd` installed and running
    
-   Root or `sudo` access required
    

### **Test Plan:**

**Using Linux Command Line:**

1.  Check for existing audit rules monitoring the sudoers file:
    
    auditctl -l | grep sudoers
    
2.  Review audit rules configuration files:
    
    grep sudoers /etc/audit/rules.d/\*
    

### **Implementation Plan:**

**Using Linux Command Line:**

1.  Add audit rules to monitor changes to the sudoers file and directory:
    
    auditctl -w /etc/sudoers -p wa -k scope\_changes
    auditctl -w /etc/sudoers.d/ -p wa -k scope\_changes
    
2.  To persist these rules, add the following lines to `/etc/audit/rules.d/audit.rules`:
    
    \-w /etc/sudoers -p wa -k scope\_changes
    -w /etc/sudoers.d/ -p wa -k scope\_changes
    
3.  Restart auditd service:
    
    systemctl restart auditd
    

### **Backout Plan:**

**Using Linux Command Line:**

1.  Remove the audit rules monitoring sudoers:
    
    auditctl -W /etc/sudoers -p wa -k scope\_changes
    auditctl -W /etc/sudoers.d/ -p wa -k scope\_changes
    
2.  Remove the lines from `/etc/audit/rules.d/audit.rules`
    
3.  Restart auditd service:
    
    systemctl restart auditd
    

### **References:**

CIS Amazon Linux 2 Benchmark v3.0.0  
Auditd Rule Documentation  
NIST SP 800-53 Revision 5 - AU-6

###

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