Actions
Issue #1085
closedpulp-admin and pulp-admin auth user update both use the -p flag for different purposes
Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
The -p flag can be used with any command in pulp-admin to either pass a password to be used with a username, or to ask pulp-admin to prompt you for a password if one is not specified.
It seems that pulp-admin auth user update also accepts a -p flag! And bizarrely, you can use both -p's in the same command, which is very confusing. Sadly, I think fixing this might have to wait for a major release.
For example, here is how you might use the -p flag twice in the same invocation of pulp-admin for different meanings:
$ pulp-admin -u admin -p admin auth user update --login test-user -p
Here are the relevant help texts for the two uses:
$ pulp-admin --help
Usage: pulp-admin [options]
Options:
-h, --help show this help message and exit
-u USERNAME, --username=USERNAME
username for the Pulp server; if used will bypass the
stored certificate and override a username specified
in ~/.pulp/admin.conf
-p PASSWORD, --password=PASSWORD
password for the Pulp server; must be used with
--username. if used will bypass the stored certificate
and override a password specified in
~/.pulp/admin.conf
--config=CONFIG absolute path to the configuration file
--map prints a map of the CLI sections and commands
-v enables verbose output; use twice for increased
verbosity with debug information
(pulp)[vagrant@dev pulp]$ pulp-admin auth user update
Command: update
Description: changes metadata of an existing user
Available Arguments:
--login - (required) identifies the user to be updated
--name - user-readable full name of the user
--password - new password for the user, use -p if you want to be prompted for
the password
-p - if specified, you will be prompted to enter new password for the
user
The following options are required but were not specified:
--login
I noticed this when doing pull request review for #1058 where I saw this command being used in the bug report:
Related issues
Actions