{
  "id": "CB-UBU-AUTH-024",
  "standard": "ubuntu",
  "version": "0.1.2",
  "url": "https://baselines.cirsec.org/b/ubuntu/v0.1.2/CB-UBU-AUTH-024",
  "json": "https://baselines.cirsec.org/b/ubuntu/v0.1.2/CB-UBU-AUTH-024.json",
  "yaml": "https://baselines.cirsec.org/b/ubuntu/v0.1.2/CB-UBU-AUTH-024.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-024",
    "title": "Give each service its own dedicated account",
    "finding": {
      "title": "Several services share one account, or run as a person's account",
      "description": "A compromise of one service gives access to the files and secrets of all the others running as the same user."
    },
    "status": "active",
    "profiles": [
      "core"
    ],
    "risk": {
      "severity": "medium"
    },
    "assessment": "manual",
    "tags": [
      "accounts",
      "service-accounts",
      "least-privilege"
    ],
    "description": "Each service runs under its own system account, used by nothing else: not shared with another\nservice, not a person's account, and not `root` unless the service truly needs it.\n",
    "rationale": "Unix permissions separate users, not programs. Services sharing an account can read and modify\neach other's files, keys and memory, so the weakest one exposes all of them.\n",
    "impact": "Separating services that shared an account means new accounts, new file ownership and\nsometimes new group memberships.\n",
    "audit": {
      "manual": "1. List running services and their users: `ps -eo user,comm --sort=user` and\n   `systemctl show -p User --value <unit>` for each service unit.\n2. Check that no account runs two unrelated services, that no service runs as a person's\n   account, and that services running as root need it.\n"
    },
    "remediation": {
      "manual": "Create a system account per service (`adduser --system --group <name>`), give it ownership of\nits files only, and set `User=` and `Group=` in the service unit (or use `DynamicUser=yes`).\n"
    },
    "references": [
      {
        "title": "systemd.exec(5), Ubuntu manual pages (User=, DynamicUser=)",
        "url": "https://manpages.ubuntu.com/manpages/noble/man5/systemd.exec.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 (R35)",
        "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": "R35",
        "relation": "equivalent"
      },
      {
        "framework": "nist-800-53r5",
        "framework_version": "5.1.1",
        "id": "AC-6",
        "relation": "related"
      }
    ],
    "threats": [
      {
        "framework": "mitre-attack",
        "id": "T1068"
      }
    ],
    "authors": [
      {
        "name": "Alice",
        "github": "Sn0wAlice"
      }
    ],
    "introduced_in": "0.1.0",
    "created": "2026-10-19",
    "updated": "2026-10-19"
  }
}