{"canonical_url":"https://engineer.company/glossary/user/","content_markdown":"# User\n\n## What it is\n\nA user is whoever, or whatever, a system acts for. In ordinary technical writing the word does three\ndifferent jobs, and most confusion about users comes from letting those jobs blur into one.\n\nThe first sense is the person: someone who opens a product and tries to get something done.\nDesigners, support staff and product managers usually mean this one, and it has no fixed shape\ninside the system at all. The second is the account: the record a system keeps so that it can\nrecognise someone again, usually a name to sign in with, an internal identifier, a set of\npermissions and a status such as active or suspended. Most application code means this one. The\nthird is the operating-system user: on Unix-like systems, an entry in the user database with a user\nname and a numeric user ID. Running processes carry user-ID credentials that the kernel uses\nfor permission checks.\n\nThe three rarely line up one to one. A person can hold accounts in many services, and NIST's digital\nidentity guidelines say plainly that a person may have several digital identities, each unique only\ninside its own service. One account can be shared by several people, which is nearly always a\nmistake. And a great many users have no person behind them at all: the web server, the database, the\nbackup job and the deploy script each run as an operating-system user of their own, and often hold\naccounts in other systems as well. That is why the NIST definition reads \"individual, or (system)\nprocess acting on behalf of an individual\".\n\nOn a Unix host the split between name and number is easy to see:\n\n```text\n$ id ana\nuid=1001(ana) gid=1001(ana) groups=1001(ana)\n```\n\nThe kernel works with the number. POSIX defines a user database holding, for each user, the user\nname, the numerical user ID, an initial group ID, an initial working directory and an initial\nprogram to run. File ownership is stored as the number, and the name is looked up only when\nsomething is shown to a person. A process also carries more than one user ID: a real one, which says\nwho started it, and an effective one, which says whose permissions it is using at that moment.\n\nApplication accounts usually make the same separation. The SCIM standard, used to provision users\nfrom one system into another, requires a `userName` that people see and sign in with, unique within\nthe service and compared without regard to case, and a separate `id` that the service assigns, that\nstays stable and is never reassigned. An `active` flag tells a suspended account apart from a\nworking one.\n\n## Why it matters\n\nEvery access decision is a decision about a user, so a muddled idea of who the user is turns into a\nmuddled decision. The question \"may this person see this invoice?\" is answered in code as \"does this\naccount, in this context, hold a permission that covers this record?\", and each step of that\ntranslation is a place where the intended person and the actual account can drift apart.\n\nThe line between person and account is also where accountability lives. Logs record accounts. When\neach account belongs to exactly one person, a log line says who did something. When an account is\nshared, the log says which secret was used and nothing about who typed it, and ending one person's\naccess means changing it for everybody.\n\nOperating-system users are a long-established tool for least privilege. A service that runs as its\nown unprivileged user is limited by that user's permissions, not just by file ownership. It can\nstill modify shared writable resources, make network requests and use credentials available to\nit. Separate service users reduce the damage a compromise can do; they are not complete isolation.\nThe same service running as the superuser can put the whole machine at risk. Giving each program\na user of its own is a small configuration change that narrows the permissions available when\nsomething goes wrong.\n\nFinally, people and accounts have different lifetimes. People change their names, their email\naddresses and their employers; accounts are suspended, merged and deleted. A system that treats a\nchangeable attribute, such as an email address, as the identity of an account will one day attach\none person's history to someone else.\n\n## What it looks like in practice\n\nOn a maritime platform, professionals manage organisations, such as companies and academies, that\nhave no logins of their own. The page states the rule directly: the person is the account, and the\norganisation is something they act on behalf of. The work was a\n[context switch that lets a user act as any organisation they manage](/portfolio/built-organization-context-switching-for-users/).\nThe browser's local storage holds which organisation is active, so switching is instant, and a\nserver-side cookie mirrors it so that pages rendered on the server show the same context. None of\nthat decides access. Authorisation is checked again on the server for every request, so someone who\nedits the stored value changes only what their own screen shows.\n\nOn the company's own host, releases are shipped by an operating-system user with almost no rights.\nWhen the [container plane](/portfolio/ran-containers-on-podman-and-quadlet/) was set\nup, deployment was separated from provisioning: root prepares the deployment path once, and after\nthat an unprivileged user redeploys by running one fixed script through a scoped rule that permits\nthat command and no arguments. A routine release builds the image and restarts the service, and\nnobody opens a root shell to do it.\n\nKnowing who the users are is itself a report. One of\n[seven read-only reporting roles](/portfolio/built-7-read-only-host-reporting-roles/)\nrenders an access report from the live host into Markdown in the repository, with accounts, sudo\nscope, key fingerprints, users of the git forge and database roles side by side. The seven reports\nshare one rule: a figure appears only when the run measured it, and a gap stays blank rather than\ntaking a plausible guess that a reader would believe. Taken together, the reports have found real\nthings, among them an undeclared listening port and two dead security controls.\n\n## Where it goes wrong\n\n**A deleted user comes back as someone else.** An account is removed, its identifier is later issued\nagain, and the newcomer inherits whatever still points at the old value: rows in a table, a place on\na list, files on disk. On a Unix host the files a removed user owned keep their numeric owner, and\nthe next user created with that number owns them. Give accounts identifiers that are never reused,\nas SCIM requires of its `id`, and decide what happens to a departing user's data before removing the\nuser.\n\n**An email address is used as the account.** It looks like a natural key until someone changes\naddress, loses access to an old one, or an employer passes an address on to a new member of staff.\nThen one person's history is attached to another, or one person ends up with two accounts. Keep a\nstable internal identifier as the key and treat the address as an attribute that can change.\n\n**Everyone signs in as the same account.** A shared administrator login is quick to set up and\nimpossible to audit. When someone leaves, their access ends only if the secret changes for everyone,\nand the log names a role instead of a person. One account per person, with shared power granted\nthrough groups, roles or a narrowly scoped sudo rule, keeps both the log and the departures honest.\n\n**The browser decides what the user may do.** A role kept in local storage, a cookie or a hidden\nform field is a suggestion from the client, and anyone can edit it. If the server trusts it, editing\nit is an attack. The client may remember context for convenience; the server has to check\npermissions itself, on every request.\n\n**A service runs as root because it was simpler.** Everything works, but an exploitable flaw in\nthat service can put the whole host at risk. Give each service its own unprivileged user, and grant any\nextra right narrowly, for one named command, rather than broadly.\n\n## Further reading\n\n- [NIST CSRC glossary: user](https://csrc.nist.gov/glossary/term/user) — the definitions used across\n  NIST security publications, each with the document it comes from.\n- [POSIX.1-2024 Base Definitions: Definitions](https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap03.html)\n  — the formal meaning of user database, user ID and user name on Unix-like systems.\n- [RFC 7643: SCIM Core Schema](https://www.rfc-editor.org/rfc/rfc7643) — the User resource for\n  moving accounts between services, with `userName`, `id` and `active`.\n- [NIST SP 800-63-4: Digital Identity Guidelines](https://pages.nist.gov/800-63-4/sp800-63.html) —\n  how one person can hold several digital identities, and the roles of applicant, subscriber and\n  claimant.\n- [POSIX.1-2024: File Access Permissions](https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap04.html#tag_04_07)\n  — access through owner, group and other permission classes, alternate access\n  controls and appropriate privileges; ownership alone does not bound access.\n\n\u003chttps://engineer.company/glossary/user/\u003e\n","date_modified":"2026-11-09T21:50:25Z","description":"The three things the word user means in software — a person, an account and an operating-system identity — and the faults that come from mixing them up.","formats":{"gemtext":"https://engineer.company/glossary/user/index.gmi","gopher":"https://engineer.company/glossary/user/gophermap","html":"https://engineer.company/glossary/user/","json":"https://engineer.company/glossary/user/index.json","markdown":"https://engineer.company/glossary/user/index.md","pdf":"https://engineer.company/glossary/user/index.pdf"},"kind":"page","language":"en","title":"What is a user?","url":"https://engineer.company/glossary/user/","version":1}