Use hammer in Red Hat Satellite 6 without a password

To use hammer without a password, we have to store the credentials in a file under the users home directory.

On the server you have hammer installed create a file called ~/.hammer/cli_config.yml

$ mkdir -p ~/.hammer/log
$ vi ~/.hammer/cli_config.yml

Add the following content, replacing USERNAME and PASSWORD with the username and password for the satellite host specified by HOSTNAME.

:ui:
    :interactive: true
    :per_page: 200
    :history_file:  '~/.hammer/history'
:foreman:
    :host: 'https://HOSTNAME/'
    :username: USERNAME
    :password: PASSWORD
:log_dir: '~/.hammer/log'
:log_level: 'error'

Now we need to lock down access to the file by setting the permissions to the owner only.

$ chmod 600 ~/.hammer/cli_config.yml

You can now use hammer without specifying the username and password each time.

 

Advertisements
Use hammer in Red Hat Satellite 6 without a password

2 thoughts on “Use hammer in Red Hat Satellite 6 without a password

  1. Someone essentially help to make seriously posts I would state. This is the very first time I frequented your web page and thus far? I surprised with the research you made to make this particular publish incredible. Magnificent job! eegfbgeaaeeefgaf

    Like

    1. Your comment ended up in my spam box, so i’m not sure if you are genuinely posted this.
      However I don’t filter comments, so I’ve approved it.

      Assuming you are being sarcastic, and pointing out this is not difficult stuff, I agree, it’s not hard. However I’ve made this blog for me, not for anyone else. I don’t profit in any way from it, it’s just a reference for things I forget, and need to find in a hurry.

      If you find it useful, then great, if not, that makes me very sad /s.

      Thanks

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s