# urbestack-user-second-factor-codes

First published 14 Oct 2026 (release 0.2.0) · Unchanged since publication

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

## Usage

```
urbestack-user-second-factor-codes --name NAME
```

## Description

Replaces the user's recovery codes with eight new codes and prints them once. Each code can replace a code from the authenticator app for one login. All previous recovery codes stop working.

The user must have a confirmed second factor. The initial recovery codes come from urbestack-user-second-factor-confirm.

## Same in the API

- [POST /auth/second-factor/recovery-codes](https://urbestack.com/docs/api/post-auth-second-factor-recovery-codes.md): Replace the caller's second-factor recovery codes

## 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-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.
- [urbestack-user-set](https://urbestack.com/docs/commands/urbestack-user-set.md): Updates an existing UrbeStack account.
