# Ensure Access to the su Command Is Restricted

- Source: https://support.icompaas.com/support/solutions/articles/62000235539-ensure-access-to-the-su-command-is-restricted
- 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 su command allows a user to switch to another user account, commonly to root. Restricting access to the su command limits who can perform privilege escalation, reducing the risk of unauthorized root access.

Rationale:  
 Controlling access to su helps enforce the principle of least privilege and prevents unauthorized users from gaining elevated access.

Impact:  
 Pros:

-   Enhances system security by limiting privilege escalation.  
    
-   Supports accountability by restricting root access.  
    

Cons:

-   May limit legitimate administrative access if not managed properly.  
    

Default Value:  
 By default, access to su may be unrestricted or limited depending on system configuration.

Pre-requisites:

-   Root or sudo privileges to configure user group memberships and file permissions.  
    

Remediation:

### Test Plan:

Using Linux command line:

1.  Check the group ownership of the su binary:  
    
    ls -l /bin/su
    
      
    
2.  Identify if su is restricted to a specific group (e.g., wheel or root).  
    

Verify which users are members of the group allowed to use su:  

getent group wheel

3.   (Replace wheel with the appropriate group if different.)
    

### **Implementation Plan:**

**Using Linux command line:**

1\. Change group ownership of the su binary to a restricted group (e.g., wheel):  

chgrp wheel /bin/su
chmod 4750 /bin/su

2\. Add authorized users to the restricted group:  

usermod -aG wheel <username>

3\. Verify permissions and group memberships.  

### **Backout Plan:**

**Using Linux command line:**

1\. Revert su permissions and group ownership if necessary:

chgrp root /bin/su
chmod 4755 /bin/su

2\. Remove users from the restricted group if needed.  
  
References:

-   CIS Amazon Linux 2 Benchmark v3.0.0  
    
-   su Manual  
    
-   [NIST SP 800-53 Revision 5 - AC-6  
    ](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final#ac-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.
