---
search:
  tags:
    - users
    - POST
seo:
  description: >-
    Creates a Linux account with its own group and home, so that several agents…
    Reference for the POST /v1/sandboxes/{sandbox}/users endpoint in the pols.so
    API.
sidebar:
  label: Add a Linux user to a running sandbox
  badge: POST
title: Add a Linux user to a running sandbox
type: openapi-operation
---
Creates a Linux account with its own group and home, so that several
agents sharing one sandbox each work as their own user. Exec, file
writes and SSH through the gateway then take the user's name. The
account lives on the sandbox's disk: it stays across stop, resume
and standby, forks copy it, and templates keep it for the sandboxes
made from them.

This is Linux-level separation (separate homes and file
permissions), not a security boundary between the users of one
sandbox: a user with `sudo` is root, and anyone with the org's API
keys can act as every user. Each user has a desktop of its own,
started on demand (`user` on `POST .../desktop`, `/computer/*` and
`/browser/cdp`).

The name must be free in the sandbox: names of system accounts and
groups, `root`, `user` and other reserved names are refused (400),
as is a name an account or group inside the sandbox already has
(409). The home is `/home/<name>`, which must not exist yet (409).
The sandbox must be running; one in standby is woken. While a fork
of the sandbox or a template from it is still being copied, users
cannot be added or removed (409); try again shortly.

`POST /v1/sandboxes/{sandbox}/users`
