# urbestack-protected-user-add

First published 4 Nov 2026 (release 0.2.24) · Unchanged since publication

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

## Usage

```
urbestack-protected-user-add --user CUSTOMER --path /web/example.com/public_html/private --name NAME [--expires-at TIME] --password-stdin
```

## Description

Adds a user to a customer's password-protected folder. The username must be unique within the folder. It must contain 1 to 64 characters and begin with an ASCII letter or digit. The allowed characters are ASCII letters, digits, dots, underscores, hyphens, @ and +. Use --password-stdin and supply a password of 8 to 128 printable ASCII characters on standard input. UrbeStack hashes it the same way it hashes a system password.

The user starts enabled, with no end time by default. Use --expires-at with a future UTC time in the format 2026-11-04T09:30:00Z. Apache uses its own clock to end access at that minute. The user stays listed as ended until you set a new end time, clear it, or remove the user.

UrbeStack regenerates the password file and the sites' virtual host configurations and reloads Apache immediately.

## Same in the API

- [POST /protected-folders/{id}/users](https://urbestack.com/docs/api/post-protected-folders-id-users.md): Add a user to a protected folder

## Command family: protected

- [urbestack-protected-folder-add](https://urbestack.com/docs/commands/urbestack-protected-folder-add.md): Protects a customer's folder with HTTP Basic authentication.
- [urbestack-protected-folder-del](https://urbestack.com/docs/commands/urbestack-protected-folder-del.md): Removes HTTP Basic authentication from a protected folder and deletes its folder users.
- [urbestack-protected-folder-set](https://urbestack.com/docs/commands/urbestack-protected-folder-set.md): Changes whether Apache lists a protected folder's files for signed-in visitors when there is no index page.
- [urbestack-protected-list](https://urbestack.com/docs/commands/urbestack-protected-list.md): Lists password-protected folders for a customer or reseller.
- [urbestack-protected-user-del](https://urbestack.com/docs/commands/urbestack-protected-user-del.md): Removes the user named by --name from a protected folder and reloads Apache.
- [urbestack-protected-user-set](https://urbestack.com/docs/commands/urbestack-protected-user-set.md): Changes the password, username, enabled status, or access end time of a user in a protected folder.
