Document URL: https://doc-stage.usersys.redhat.com/documentation/en/red-hat-satellite/6.2/single/hammer-cli-guide/#sect-CLI_Guide-Authentication
Section Number and Name: 1.2. AUTHENTICATION
Describe the issue: In step 1 the example command is prefixed "#", which is the convention for commands to be run under the `root` user's credentials. This conflicts with all the other CLI examples in the guide are prefixed "$", which indicates they're to be run by a non-root user account. If the instructions were followed as written, the credentials stored as per these instructions could not be used as they are not in the location expected by the `hammer` tool.
Suggestions for improvement: Change the prefix used in the first example command from `#` to `$`.
I set this BZ ticket NEEDINFO for you as I'd appreciate validation of this BZ ticket's description. Am I right in specifying the "Suggestions for improvement"?
I agree the prompt should be $ as all the commands in the guide are, correctly, as non-root user.
But also need to fix this bit:
For example, if you plan to issue hammer commands as root, issue:
(there is actually no point in that command as those would be the default perms for root).
The whole procedure is a bit backwards, telling you to change the perms before creating and closing the file.
Create the file `~/.hammer/cli_config.yml` and add the following contents to the file:
Replace the example values with your own details. Do not use tabs in the file, always use indentation by spaces.
To protect your password, make sure the file is only readable by the current user:
$ chmod 600 ~/.hammer/cli_config.yml
Save and close the file. Now when you start hammer it will use the credentials in the ~/.hammer/cli_config.yml file.
Do not use tabs in Hammer configuration files. Always use indentation by spaces.
Assigning to Zac for review.
Thanks for your feedback, especially confirmation that this is an issue.
I think your suggested reworked version of the content looks good. I have only one suggested change, and that is to change the order of the admonition about spacing. Instead of opening with "Do not...", I think it reads better to open with "Use *only* spaces for indentation...".
This content is now live on the Customer Portal.