[GH-ISSUE #167] accountCreate help text doesn't seem to be correct #37

Closed
opened 2026-05-07 00:17:57 +02:00 by BreizhHardware · 2 comments

Originally created by @ldelelis on GitHub (Mar 30, 2021).
Original GitHub issue: https://github.com/ovh/the-bastion/issues/167

Trying to create an account to a recently deployed bastion, using only --account yields the following help message

~ Create a new bastion account
~
~ Usage: --osh accountCreate --account ACCOUNT [OPTIONS]
~
~   --account NAME          Account name to create, NAME must contain only valid UNIX account name characters
~   --uid UID               Account system UID, also see --uid-auto
~   --uid-auto              Auto-select an UID from the allowed range (the upper available one will be used)
~   --always-active         This account's activation won't be challenged on connection, even if the bastion is globally
~                             configured to check for account activation
~   --osh-only              This account will only be able to use ``--osh`` commands, and can't connect anywhere through the bastion
~   --immutable-key         Deny any subsequent modification of the account key (selfAddKey and selfDelKey are denied)
~   --comment '"STRING"'    An optional comment when creating the account. Quote it twice as shown if you're under a shell.
~   --public-key '"KEY"'    Account public SSH key to deposit on the bastion, if not present,
~                             you'll be prompted interactively for it. Quote it twice as shown if your're under a shell.
~   --no-key                Don't prompt for an SSH key, no ingress public key will be installed
~   --ttl SECONDS|DURATION  Time after which the account will be deactivated (amount of seconds, or duration string such as "4d12h15m")
~ Missing mandatory parameter 'account' or ('uid' or 'uid-auto')

According to it, I should be able to create an account using only the --account option, but using --uid-auto (or I assume manually passing an uid) was mandatory. Should the final line be 'account' and (...) instead of 'account' or (...)? If this were the case, the usage string should probably be updated too.

Bastion version: 3.03.00

Originally created by @ldelelis on GitHub (Mar 30, 2021). Original GitHub issue: https://github.com/ovh/the-bastion/issues/167 Trying to create an account to a recently deployed bastion, using only `--account` yields the following help message ``` ~ Create a new bastion account ~ ~ Usage: --osh accountCreate --account ACCOUNT [OPTIONS] ~ ~ --account NAME Account name to create, NAME must contain only valid UNIX account name characters ~ --uid UID Account system UID, also see --uid-auto ~ --uid-auto Auto-select an UID from the allowed range (the upper available one will be used) ~ --always-active This account's activation won't be challenged on connection, even if the bastion is globally ~ configured to check for account activation ~ --osh-only This account will only be able to use ``--osh`` commands, and can't connect anywhere through the bastion ~ --immutable-key Deny any subsequent modification of the account key (selfAddKey and selfDelKey are denied) ~ --comment '"STRING"' An optional comment when creating the account. Quote it twice as shown if you're under a shell. ~ --public-key '"KEY"' Account public SSH key to deposit on the bastion, if not present, ~ you'll be prompted interactively for it. Quote it twice as shown if your're under a shell. ~ --no-key Don't prompt for an SSH key, no ingress public key will be installed ~ --ttl SECONDS|DURATION Time after which the account will be deactivated (amount of seconds, or duration string such as "4d12h15m") ~ Missing mandatory parameter 'account' or ('uid' or 'uid-auto') ``` According to it, I should be able to create an account using only the `--account` option, but using `--uid-auto` (or I assume manually passing an uid) was mandatory. Should the final line be `'account' and (...)` instead of `'account' or (...)`? If this were the case, the usage string should probably be updated too. Bastion version: 3.03.00
Author
Owner

@speed47 commented on GitHub (Mar 31, 2021):

Thanks for the report, you're right. Fixing.

<!-- gh-comment-id:810821345 --> @speed47 commented on GitHub (Mar 31, 2021): Thanks for the report, you're right. Fixing.
Author
Owner

@speed47 commented on GitHub (Apr 8, 2021):

Merged to the main branch github.com/ovh/the-bastion@e412083272

<!-- gh-comment-id:815632718 --> @speed47 commented on GitHub (Apr 8, 2021): Merged to the main branch https://github.com/ovh/the-bastion/commit/e4120832726b30d846aa5e80d0506305bdff069d
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/the-bastion#37
No description provided.