orbitmqctl reference
The orbitmqctl command line — passwd, its options and the exit codes.
orbitmqctl is the OrbitMQ management command line. orbitmqctl passwd works offline.
orbitmqctl <command> [options]| Command | Purpose |
|---|---|
passwd | Print a password-file line username:hash. |
| Option | Effect |
|---|---|
-h, --help | Show the help (also after a command: orbitmqctl passwd --help). |
-V, --version | Show the version. |
orbitmqctl is built from the sdk-cli repository (cargo build --release; the binary is
target/release/orbitmqctl). Published binaries are not available yet.
Exit codes
| Code | Meaning |
|---|---|
0 | Done. |
1 | Failed: an invalid user name or password, or the line could not be written. |
2 | Invalid command line. The usage is printed after the error. |
Errors go to standard error, prefixed with the command (orbitmqctl passwd: …).
passwd
orbitmqctl passwd [--scheme argon2id|pbkdf2-sha256|bcrypt] [--stdin] <username>Prints a line username:hash for the broker's password file.
| Option | Effect |
|---|---|
--scheme <name> | Hash scheme: argon2id (default; m=19456 KiB, t=2, p=1), pbkdf2-sha256 (600000 iterations) or bcrypt (cost 12). |
--stdin | Read the password from the first line of standard input, for scripts and pipes. Without it, the password is read from the terminal without echo and asked twice. |
-h, --help | Show the help. |
The password is never accepted as a command-line argument.
orbitmqctl passwd alice >> /etc/orbitmq/passwords # prompts twice, no echo
printf '%s\n' "$PW" | orbitmqctl passwd --stdin --scheme bcrypt bob # scripts and pipes