Skip to content

User Management Commands ​

These commands help you manage customer accounts in the AdminBolt system.

bolt-cli create-admin-account ​

Creates a new administrator account in the system.

Example: ​

bash
bolt-cli create-admin-account

This command will prompt you for the necessary information to create a new admin account, including:

  • Admin name
  • Email address
  • Password

The command prevents the creation of duplicate admin accounts with the same email address.

bolt-cli reset-admin-account-password ​

Resets the password for an existing administrator account.

Example: ​

bash
bolt-cli reset-admin-account-password jane

Since panel 1.9.5, the administrator is named after the command, by username or by an e-mail address exactly one administrator account has, compared without regard to letter case, the same way the sign-in form takes it. Without a name, the command resets admin; when there is no admin, it says so and lists the administrators of the server.

The command then asks for the new password, with the input hidden. Leave it empty to have a strong 20-character password generated and printed. A password you type has to be at least 10 characters.

Usage Example: ​

bash
$ bolt-cli reset-admin-account-password jane
New password for jane (leave empty to generate one):
The password of jane was reset.
Username: jane (or [email protected])

Important Notes: ​

  • Before 1.9.4 the command took an email address only, which an administrator set up through onboarding did not have. In 1.9.4 it asked for the username or email address interactively.
  • An unknown name is refused with "No administrator has the username or e-mail name. Nothing was changed.", followed by the administrators on the server.
  • Every reset is recorded in the panel log.
  • Passwords are securely hashed before storage

bolt-cli admin-sso-generate ​

Prints a one-time login URL that signs you in to the admin panel without a password.

Options: ​

  • --admin: The administrator username to sign in as. An unknown name is refused; the command never creates an account for it. Available since panel 1.9.0.
  • --expire: How long the link stays valid, for example 30m, 2h, 24h, or 7d.
  • --first-admin: Since panel 1.9.5. The username of the administrator the command creates when the server has none yet, as on a new server. A name, or random for admin- followed by 6 random characters. When omitted, the name is admin. The name follows the rule of Admin Management: when it breaks the rule, nothing is created and the command prints why. When an administrator already exists, the option has no effect.

Example: ​

bash
bolt-cli admin-sso-generate --admin=jane

The command prints the administrator the link signs in as, "Logs in as administrator: name", then the URL.

On a new server, name the first administrator yourself:

bash
bolt-cli admin-sso-generate --first-admin=random

The installer does this for you with --admin-username.

Without --admin, the link signs in as admin while that account exists, and otherwise as the oldest remaining administrator. The link does not recreate a deleted admin account and does not force a password change. A new administrator account is created only when the server has none at all.

Warning: The URL signs anyone who opens it in as an administrator. Treat it like a password: do not paste it into tickets, chats, or logs, and open it only on a machine you trust.

bolt-cli set-admin-password ​

Sets a temporary password for an administrator. This command is intended for unattended installations, where you set the admin password without using the one-time SSO login URL.

Options: ​

  • --username: Since panel 1.9.5. The administrator whose password is set. When omitted, the command sets the password of admin, or of the oldest administrator when there is no admin. On a server with several administrators and no admin, name one. An unknown name is refused with "Administrator name does not exist." When the server has no administrator at all, the command creates admin.
  • --password-stdin: Since panel 1.9.5. Read the password from the first line of standard input. Only the line break at its end is removed, so spaces stay part of the password. An empty or missing first line is refused, and nothing is changed.
  • --password: The password to set, on the command line.

When you give neither --password-stdin nor --password, the command generates a strong 20-character password and prints it. A password you supply is never printed. --password and --password-stdin cannot be combined.

Examples: ​

bash
bolt-cli set-admin-password --username=jane
bash
bolt-cli set-admin-password --username=jane --password-stdin < /root/admin-password.txt

The command prints the login the password is set on. The password is temporary: at the next sign-in, the panel asks the administrator to set a new one, of at least 10 characters, before any other page opens.

root is refused, because root signs in with the server's root password; change that on the server, for example with passwd.

Warning: A password passed with --password is visible to other users of the server in the process list while the command runs, and stays in the shell history. Since panel 1.9.5 the command warns about it. Use --password-stdin instead.