Ubuntu · Accounts & authentication

Never disable authentication for sudo globally

When it fails: sudo is configured to skip authentication. With authentication disabled, every sudo rule works without a password, for every user it applies to.

CB-UBU-AUTH-007highactiveautomatedprofile core

Description

The !authenticate default turns off password checks for every rule it applies to. Unlike a NOPASSWD: tag on one rule, it is easy to miss because it sits in a Defaults line.

sudo-rs, the sudo of Ubuntu 26.04, does not know the authenticate setting: its visudo rejects the line. The check still applies, since the original sudo stays installed and can be selected again through the sudo alternative.

Rationale

A global !authenticate silently turns every administrator account into a password-less root account: stealing any of their sessions is enough to control the system.

Impact

None for a standard configuration. Ubuntu does not set it.

Applies when

Detected: when: A sudo command is installed (sudo or sudo-rs) A scanner reports the control not applicable when one is false.

Audit

Run grep -r '!authenticate' /etc/sudoers /etc/sudoers.d/. There must be no match.

Automated: every check must pass. Scanners report each check by its id.

sudoers

No !authenticate in /etc/sudoers.

path: /etc/sudoers
pattern: ^[^#]*!\s*authenticate
expect: no_match

sudoers-d

No !authenticate in /etc/sudoers.d/.

path: /etc/sudoers.d/*
pattern: ^[^#]*!\s*authenticate
expect: no_match

Remediation

Remove every Defaults ... !authenticate entry with visudo (or visudo -f for files in /etc/sudoers.d/).

Rollback

Add the entry back with visudo.

References

Mappings

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; 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; 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; 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; profiles core and server-hardened.
Introduced inv0.1.0
Created, updated2026-10-19, 2026-10-19
Translationsfr