{
  "id": "CB-UBU-AUTH-004",
  "standard": "ubuntu",
  "version": "0.1.2",
  "url": "https://baselines.cirsec.org/b/ubuntu/v0.1.2/CB-UBU-AUTH-004",
  "json": "https://baselines.cirsec.org/b/ubuntu/v0.1.2/CB-UBU-AUTH-004.json",
  "yaml": "https://baselines.cirsec.org/b/ubuntu/v0.1.2/CB-UBU-AUTH-004.yml",
  "profiles_effective": [
    "core",
    "server",
    "server-hardened",
    "desktop",
    "desktop-hardened"
  ],
  "license": "Text CC BY 4.0, code Apache-2.0",
  "attribution": "CIRSEC Baselines, https://baselines.cirsec.org",
  "control": {
    "id": "CB-UBU-AUTH-004",
    "title": "Install sudo for administrative access",
    "finding": {
      "title": "sudo is not installed",
      "description": "Without sudo, administrators share the root password or log in as root, and their actions cannot be traced to a person."
    },
    "status": "active",
    "profiles": [
      "core"
    ],
    "risk": {
      "severity": "medium"
    },
    "assessment": "automated",
    "tags": [
      "sudo",
      "privilege-escalation",
      "accountability"
    ],
    "description": "`sudo` lets authorized users run commands as root (or another user) with their own password,\naccording to rules in `/etc/sudoers` and `/etc/sudoers.d/`. Every command is logged with the\nname of the user who ran it.\n",
    "rationale": "Administration through personal accounts and sudo replaces a shared root password, gives each\nadministrator only the rights they need, and leaves an audit trail that names who did what.\n",
    "impact": "None known. Ubuntu installs sudo on every server, desktop and cloud image.\n",
    "notes": "Since Ubuntu 25.10, the `sudo` command is provided by `sudo-rs`, a reimplementation in Rust,\nselected through the `sudo` alternative; the original `sudo` package stays installed. Either\npackage meets this control.\n",
    "audit": {
      "manual": "Run `dpkg -s sudo sudo-rs`. At least one of the two packages must be installed.\n",
      "logic": "any",
      "checks": [
        {
          "id": "package",
          "engine": "package",
          "description": "The sudo package is installed.",
          "spec": {
            "name": "sudo",
            "state": "installed"
          }
        },
        {
          "id": "package-rs",
          "engine": "package",
          "description": "The sudo-rs package is installed.",
          "spec": {
            "name": "sudo-rs",
            "state": "installed"
          }
        }
      ]
    },
    "remediation": {
      "manual": "Run `apt install sudo`, then grant administrators access by adding them to the `sudo` group.\n",
      "effects": {
        "restart": "none",
        "disruption": "none",
        "lockout_risk": false
      },
      "scripts": [
        {
          "id": "install",
          "from_check": "package"
        }
      ]
    },
    "references": [
      {
        "title": "sudo(8), Ubuntu manual pages",
        "url": "https://manpages.ubuntu.com/manpages/noble/man8/sudo.8.html",
        "publisher": "Canonical",
        "kind": "vendor-doc",
        "accessed": "2026-10-19"
      },
      {
        "title": "sudo-rs(8), Ubuntu manual pages",
        "url": "https://manpages.ubuntu.com/manpages/noble/man8/sudo-rs.8.html",
        "publisher": "Canonical",
        "kind": "vendor-doc",
        "accessed": "2026-10-19"
      },
      {
        "title": "ANSSI-BP-028 v2.0 - Recommandations de configuration d'un système GNU/Linux (R33)",
        "url": "https://messervices.cyber.gouv.fr/documents-guides/fr_np_linux_configuration-v2.0.pdf",
        "publisher": "ANSSI",
        "kind": "guide",
        "accessed": "2026-10-19"
      }
    ],
    "mappings": [
      {
        "framework": "anssi-linux",
        "framework_version": "2.0",
        "id": "R33",
        "relation": "partial",
        "note": "R33 asks for accountable administration; sudo is the means."
      },
      {
        "framework": "nist-800-53r5",
        "framework_version": "5.1.1",
        "id": "AC-6",
        "relation": "related"
      }
    ],
    "threats": [
      {
        "framework": "mitre-attack",
        "id": "T1078.003"
      }
    ],
    "authors": [
      {
        "name": "Alice",
        "github": "Sn0wAlice"
      }
    ],
    "verified": [
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "20.04"
        ],
        "environment": "Proxmox VM, Ubuntu 20.04 cloud image, kernel 5.4.0-216-generic",
        "notes": "Passes on a fresh install (sudo installed); profiles core and server-hardened."
      },
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "22.04"
        ],
        "environment": "Proxmox VM, Ubuntu 22.04 cloud image, kernel 5.15.0-198-generic",
        "notes": "Passes on a fresh install (sudo installed); profiles core and server-hardened."
      },
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "24.04"
        ],
        "environment": "Proxmox VM, Ubuntu 24.04 cloud image, kernel 6.8.0-147-generic",
        "notes": "Passes on a fresh install (sudo installed); profiles core and server-hardened."
      },
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "26.04"
        ],
        "environment": "Proxmox VM, Ubuntu 26.04 cloud image, kernel 7.0.0-38-generic",
        "notes": "Passes on a fresh install (sudo and sudo-rs installed, sudo-rs selected by the alternative); profiles core and server-hardened."
      }
    ],
    "introduced_in": "0.1.0",
    "created": "2026-10-19",
    "updated": "2026-10-19"
  }
}