# urbestack-user-set

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 command, run as root in the server shell.

## Usage

```
urbestack-user-set --name NAME [--password-stdin [--keep-token ID]] [--email ADDR|''] [--status active|suspended] [--role admin|user|reseller] [--package NAME|''] [--owner RESELLER|''] [--second-factor off] [--shell on|off] [--backups on|off]
```

## Description

Updates an existing UrbeStack account. Specify the account with --name and supply at least one change. Pass an empty string to --email to clear the email address or to --package to remove the package and its limits. Changing an administrator's email address or moving an account into or out of the administrator role updates where root's mail is delivered.

--password-stdin reads the new password from the first line of standard input. It must be 8 to 128 printable characters. For a customer, it also sets the password for SFTP and shell access. A password change revokes every token for the account, including session tokens and manually created tokens. When a user changes their own password, --keep-token ID keeps the session with that token ID and preserves manually created tokens. All other sessions end.

--system-password-stdin sets only a customer's system password for SFTP and shell access. Supply the current UrbeStack password on the first line of standard input. The API uses this option at sign-in for customers whose passwords were set before UrbeStack stored system passwords.

--status suspended revokes every token for the account. For a customer, it also removes their mailboxes from Dovecot's users file and their domains' senders from Postfix's tables. --status active restores those mail entries. Accounts suspended for a server move must be reactivated through the move commands. For a copy awaiting cutover, use the Move section or urbestack-move-cutover --user NAME. To return a frozen account to service on the source server, use urbestack-move-source-release --user NAME. Add --take-back if the account has already moved.

--second-factor off clears the account's second factor when a device is lost. The account holder can enrol again from their account page in the web interface.

An administrator can give a customer a Bash shell with --shell on, which also removes the customer's SFTP jail. --shell off restores jailed SFTP access and ends the customer's running system sessions. Shell access requires a system account, which administrators lack.

--backups off excludes a customer from nightly server backups. Use it if their archive is too large for the disk or they make their own backups. --backups on restores the default of including the customer. Customers can still request backups. The setting applies to accounts with a home directory.

--owner moves a customer to the specified reseller. Pass an empty string to move the customer to the administrator. If the package belongs to the former reseller, change or clear it before or as part of the move. A move to a reseller must fit that reseller's limits on customer count, disk space and bandwidth. Increasing a customer's disk space or bandwidth allowance must also fit the reseller's limits. A customer must be under the administrator to change roles. A reseller must move all their customers before changing roles.

## Same in the API

- [POST /auth/login](https://urbestack.com/docs/api/post-auth-login.md): Exchange a name and password for a session token or a second-factor challenge
- [POST /auth/second-factor/disable](https://urbestack.com/docs/api/post-auth-second-factor-disable.md): Disable the caller's second factor
- [PATCH /users/{name}](https://urbestack.com/docs/api/patch-users-name.md): Update a user account
- [DELETE /users/{name}/second-factor](https://urbestack.com/docs/api/delete-users-name-second-factor.md): Clear a user's second factor

## Command family: user

- [urbestack-user-add](https://urbestack.com/docs/commands/urbestack-user-add.md): Creates an UrbeStack account.
- [urbestack-user-del](https://urbestack.com/docs/commands/urbestack-user-del.md): Deletes an UrbeStack account and its domains, subdomains, DNS zones, databases and database users.
- [urbestack-user-list](https://urbestack.com/docs/commands/urbestack-user-list.md): Lists UrbeStack accounts.
- [urbestack-user-second-factor-codes](https://urbestack.com/docs/commands/urbestack-user-second-factor-codes.md): Replaces the user's recovery codes with eight new codes and prints them once.
- [urbestack-user-second-factor-confirm](https://urbestack.com/docs/commands/urbestack-user-second-factor-confirm.md): Confirms a pending second factor using the authenticator app's six-digit code supplied with --code.
- [urbestack-user-second-factor-enrol](https://urbestack.com/docs/commands/urbestack-user-second-factor-enrol.md): Starts enrolment of a TOTP second factor and prints the secret as text and as an otpauth:// URI for an authenticator app.
