# Cis Ubuntu1204 V110 9 5

> Restrict Access to the su Command

- Skill: `cyberstrikeus/cis-ubuntu1204-v110-9-5` (Agent Skill)
- Install (CLI): `npx skillmds@latest add cyberstrikeus/cis-ubuntu1204-v110-9-5`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cyberstrikeus/cis-ubuntu1204-v110-9-5/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: cyberstrikeus (https://skillmd.com/u/cyberstrikeus)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/cyberstrikeus/cis-ubuntu1204-v110-9-5

---


# 9.5 Restrict Access to the su Command (Scored)

## Profile Applicability

- Level 1

## Description

The `su` command allows a user to run a command or shell as another user. The program has been superseded by `sudo`, which allows for more granular control over privileged access. Normally, the `su` command can be executed by any user. By uncommenting the `pam_wheel.so` statement in `/etc/pam.d/su`, the `su` command will only allow users in the wheel group to execute `su`.

## Rationale

Restricting the use of `su`, and using `sudo` in its place, provides system administrators better control of the escalation of user privileges to execute privileged commands. The `sudo` utility also provides a better logging and audit mechanism, as it can log each command executed via `sudo`, whereas `su` can only record that a user executed the `su` program.

## Audit Procedure

### Using Command Line

```bash
grep pam_wheel.so /etc/pam.d/su
grep wheel /etc/group
```

## Expected Result

```
auth required pam_wheel.so use_uid
wheel:x:10:root, <user list>
```

## Remediation

### Using Command Line

Add the following line to the `/etc/pam.d/su` file:

```bash
auth required pam_wheel.so use_uid
```

Once this is done, create a comma separated list of users in the wheel statement in the `/etc/group` file.

## Default Value

The pam_wheel.so line is commented out by default in /etc/pam.d/su.

## References

- CIS Ubuntu 12.04 LTS Server Benchmark v1.1.0

## Profile

Level 1 - Scored

