← ClaudeAtlas

hostwarden-deploy-userlisted

Set up, audit or remove a dedicated account for automated deployments — a CI/CD deploy user with a restricted shell, its own SSH key, a deployment directory it owns, and narrowly scoped sudo if it needs any at all. Use when the user asks to "set up deployment for <app>", "add a deploy user", "connect GitHub Actions to this server", "GitLab CI should deploy here", "give the pipeline SSH access", "einen Deploy-User anlegen", or asks how a build server should reach a host. Also use when removing such an account. Never hand a pipeline root or a person's own account.
hostwarden/hostwarden · ★ 2 · DevOps & Infrastructure · score 61
Install: claude install-skill hostwarden/hostwarden
# hostwarden-deploy-user **Overrides.** Load them before anything else, key `hostwarden-deploy-user`, per `rules/overrides.md`. ## Never root, never a person's account An automated pipeline — GitHub Actions, GitLab CI, anything else — gets a dedicated deploy user with minimal privileges. If the user asks to deploy as root, explain the risk and create one instead: - A compromised CI secret grants full server access. - No audit trail separating human from automated actions. - Accidental destructive commands run unchecked. ## Create the Deploy User Create a system user with no password and no login shell. Adapt the username to the project if the user prefers (e.g. `deploy-myapp`), default to `deploy`. ### Linux ```bash useradd --system --shell /usr/sbin/nologin \ --create-home --home-dir /home/deploy deploy ``` ### FreeBSD ```bash pw useradd deploy -d /home/deploy \ -s /usr/sbin/nologin -m \ -c "CI/CD deploy user" ``` ### macOS Accounts live in the directory service. Create the record with `dscl` as root: `sysadminctl` asks for an administrator's password, which a session cannot answer, and gives the account a password hash this one must not have. Pick a free UID from 501 up in the search node, which includes a bound directory service as well as local accounts (`dscl /Search -list /Users UniqueID`); below 500 is where macOS updates add their own accounts, and `IsHidden` keeps it off the login window. `dscl -create` overwrites an account that already exists.