Ubuntu · Accounts & authentication

Install sudo for administrative access

When it fails: sudo is not installed. Without sudo, administrators share the root password or log in as root, and their actions cannot be traced to a person.

CB-UBU-AUTH-004mediumactiveautomatedautomated fixprofile core

Description

sudo lets authorized users run commands as root (or another user) with their own password, according to rules in /etc/sudoers and /etc/sudoers.d/. Every command is logged with the name of the user who ran it.

Since Ubuntu 25.10, the sudo command is provided by sudo-rs, a reimplementation in Rust, selected through the sudo alternative; the original sudo package stays installed. Either package meets this control.

Rationale

Administration through personal accounts and sudo replaces a shared root password, gives each administrator only the rights they need, and leaves an audit trail that names who did what.

Impact

None known. Ubuntu installs sudo on every server, desktop and cloud image.

Audit

Run dpkg -s sudo sudo-rs. At least one of the two packages must be installed.

Automated: at least one check must pass. Scanners report each check by its id.

package

The sudo package is installed.

name: sudo
state: installed

package-rs

The sudo-rs package is installed.

name: sudo-rs
state: installed

Remediation

Run apt install sudo, then grant administrators access by adding them to the sudo group.

Restartnone
Disruptionnone

install

Generated from check package: the engine writes the fix for every output, it sets the expected value and the check runs again after.

Each release turns these fixes into remediate.sh and an Ansible role per profile: dry run by default, a fix runs only when its check fails.

References

Mappings

FrameworkIDRelationNote
ANSSI-BP-028 - Recommandations de configuration d'un système GNU/Linux2.0R33partialR33 asks for accountable administration; sudo is the means.
NIST SP 800-53 Rev. 55.1.1AC-6related

How this control relates to the other framework's: equivalent, stricter, looser, partial or related.

Threats mitigated

People and lifecycle

Authors
Verified2026-10-19 by Sn0wAlice on 20.04, Proxmox VM, Ubuntu 20.04 cloud image, kernel 5.4.0-216-generic. Passes on a fresh install (sudo installed); profiles core and server-hardened.
Verified2026-10-19 by Sn0wAlice on 22.04, Proxmox VM, Ubuntu 22.04 cloud image, kernel 5.15.0-198-generic. Passes on a fresh install (sudo installed); profiles core and server-hardened.
Verified2026-10-19 by Sn0wAlice on 24.04, Proxmox VM, Ubuntu 24.04 cloud image, kernel 6.8.0-147-generic. Passes on a fresh install (sudo installed); profiles core and server-hardened.
Verified2026-10-19 by Sn0wAlice on 26.04, Proxmox VM, Ubuntu 26.04 cloud image, kernel 7.0.0-38-generic. Passes on a fresh install (sudo and sudo-rs installed, sudo-rs selected by the alternative); profiles core and server-hardened.
Introduced inv0.1.0
Created, updated2026-10-19, 2026-10-19
Translationsfr