{
  "id": "CB-UBU-AUTH-023",
  "standard": "ubuntu",
  "version": "main",
  "url": "https://baselines.cirsec.org/b/ubuntu/CB-UBU-AUTH-023",
  "json": "https://baselines.cirsec.org/b/ubuntu/CB-UBU-AUTH-023.json",
  "yaml": "https://baselines.cirsec.org/b/ubuntu/CB-UBU-AUTH-023.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-023",
    "title": "Disable accounts that are no longer used",
    "finding": {
      "title": "Accounts of people or services that left are still active",
      "description": "Forgotten accounts keep working passwords and keys that nobody monitors."
    },
    "status": "active",
    "profiles": [
      "core"
    ],
    "risk": {
      "severity": "medium"
    },
    "assessment": "manual",
    "tags": [
      "accounts",
      "lifecycle"
    ],
    "description": "Every local account must belong to a current person or service. Accounts of people who left\nor changed role, and of services that were removed, must be locked or deleted.\n",
    "rationale": "Unused accounts are attractive to attackers: their owner will not notice a login, and their\npassword or SSH key may have leaked long ago.\n",
    "impact": "Requires a periodic review with the people who know who still needs access.\n",
    "audit": {
      "manual": "1. List the interactive accounts: `awk -F: '$3 >= 1000 && $3 < 65534 {print $1}' /etc/passwd`.\n2. For each, check with its owner or manager that it is still needed. `lastlog` and\n   `last` show the last logins.\n3. List the service accounts and check that the matching service is still installed.\n"
    },
    "remediation": {
      "manual": "Lock unused accounts with `usermod -L -e 1 <account>` (also expires SSH key logins), and\ndelete them with `userdel -r <account>` once their files have been archived.\n"
    },
    "references": [
      {
        "title": "usermod(8), Ubuntu manual pages",
        "url": "https://manpages.ubuntu.com/manpages/noble/man8/usermod.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 (R30)",
        "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": "R30",
        "relation": "equivalent"
      },
      {
        "framework": "nist-800-53r5",
        "framework_version": "5.1.1",
        "id": "AC-2(3)",
        "relation": "related"
      }
    ],
    "threats": [
      {
        "framework": "mitre-attack",
        "id": "T1078.003"
      }
    ],
    "authors": [
      {
        "name": "Alice",
        "github": "Sn0wAlice"
      }
    ],
    "introduced_in": "0.1.0",
    "created": "2026-10-19",
    "updated": "2026-10-19"
  }
}