How to change admin password through CLI on Red Hat Satellite 6?

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.x

Issue

  • How to change Satellite admin password through command line?

  • Below foreman-rake command can be used to reset the password but that create a random password, is there a way to set the password to specific one ?

    # foreman-rake permissions:reset
    

Resolution

  • The rake script allows setting password as well, via:

    # foreman-rake permissions:reset password=NewPassword
    
  • Optionally, one can use hammer for the same. First get the admin user ID from below command

    # hammer user list
    
  • Then, change the password with below command:

    # hammer user update --password <new-password> --id <admin-ID>
    
  • Note:- If the same admin user credentials is used by hammer, then update the ~/.hammer/cli.modules.d/foreman.yml file as well.

    #  vi ~/.hammer/cli.modules.d/foreman.yml                     << Enter/Update the latest credentials in file.
    

For more KB articles/solutions related to Red Hat Satellite 6.x Authentication Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Authentication Issues

SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.