{
  "id": "CB-UBU-AUTH-007",
  "standard": "ubuntu",
  "version": "0.1.0",
  "url": "https://baselines.cirsec.org/b/ubuntu/v0.1.0/CB-UBU-AUTH-007",
  "json": "https://baselines.cirsec.org/b/ubuntu/v0.1.0/CB-UBU-AUTH-007.json",
  "yaml": "https://baselines.cirsec.org/b/ubuntu/v0.1.0/CB-UBU-AUTH-007.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-007",
    "title": "Never disable authentication for sudo globally",
    "finding": {
      "title": "sudo is configured to skip authentication",
      "description": "With authentication disabled, every sudo rule works without a password, for every user it applies to."
    },
    "status": "active",
    "profiles": [
      "core"
    ],
    "risk": {
      "severity": "high"
    },
    "assessment": "automated",
    "tags": [
      "sudo",
      "privilege-escalation"
    ],
    "applicability": {
      "facts": [
        "sudo"
      ]
    },
    "description": "The `!authenticate` default turns off password checks for every rule it applies to. Unlike a\n`NOPASSWD:` tag on one rule, it is easy to miss because it sits in a `Defaults` line.\n",
    "rationale": "A global `!authenticate` silently turns every administrator account into a password-less root\naccount: stealing any of their sessions is enough to control the system.\n",
    "impact": "None for a standard configuration. Ubuntu does not set it.\n",
    "notes": "sudo-rs, the `sudo` of Ubuntu 26.04, does not know the `authenticate` setting: its `visudo`\nrejects the line. The check still applies, since the original sudo stays installed and can be\nselected again through the `sudo` alternative.\n",
    "audit": {
      "manual": "Run `grep -r '!authenticate' /etc/sudoers /etc/sudoers.d/`. There must be no match.\n",
      "checks": [
        {
          "id": "sudoers",
          "engine": "file-content",
          "description": "No !authenticate in /etc/sudoers.",
          "spec": {
            "path": "/etc/sudoers",
            "pattern": "^[^#]*!\\s*authenticate",
            "expect": "no_match"
          }
        },
        {
          "id": "sudoers-d",
          "engine": "file-content",
          "description": "No !authenticate in /etc/sudoers.d/.",
          "spec": {
            "path": "/etc/sudoers.d/*",
            "pattern": "^[^#]*!\\s*authenticate",
            "expect": "no_match"
          }
        }
      ]
    },
    "remediation": {
      "manual": "Remove every `Defaults ... !authenticate` entry with `visudo` (or `visudo -f` for files in\n`/etc/sudoers.d/`).\n",
      "rollback": "Add the entry back with `visudo`.\n"
    },
    "references": [
      {
        "title": "sudoers(5), Ubuntu manual pages",
        "url": "https://manpages.ubuntu.com/manpages/noble/man5/sudoers.5.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 (R39)",
        "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": "R39",
        "relation": "partial"
      },
      {
        "framework": "nist-800-53r5",
        "framework_version": "5.1.1",
        "id": "IA-11",
        "relation": "related"
      }
    ],
    "threats": [
      {
        "framework": "mitre-attack",
        "id": "T1548.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; 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; 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; 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; profiles core and server-hardened."
      }
    ],
    "introduced_in": "0.1.0",
    "created": "2026-10-19",
    "updated": "2026-10-19"
  }
}