Changing the password for the default admin user

When you install an instance of IBM® Software Hub, a default administrator is created.

Who needs to complete this task?
To complete this task, you must have one of the following roles:
  • Cluster administrator
  • Instance administrator
When do you need to complete this task?
You should change the password for the default administrator before you complete any tasks in the IBM Software Hub web client.

Before you begin

The workstation from which you will run the commands must be set up as a client workstation with the following command-line interfaces:

  • IBM Software Hub CLI: cpd-cli
  • OpenShift® CLI: oc

For details, see: Setting up a client workstation.

Best practice: You can run the commands in this task exactly as written if you use your installation environment variables script.

Ensure that you source the environment variables before you run the commands in this task.

Procedure

  1. Log the cpd-cli in to the Red Hat OpenShift Container Platform cluster:
    ${CPDM_OC_LOGIN}
    Remember: CPDM_OC_LOGIN is an alias for the cpd-cli manage login-to-ocp command.
  2. Get the URL of the web client:
    cpd-cli manage get-cpd-instance-details \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS}
  3. Get the default password of the default administrator:

    IBM Software Hub is integrated with the Identity Management Service
    oc get secret ibm-iam-bindinfo-platform-auth-idp-credentials \
    -n ${PROJECT_CPD_INST_OPERANDS} \
    -o jsonpath='{.data.admin_password}' | base64 --decode;

    IBM Software Hub is not integrated with the Identity Management Service
    cpd-cli manage get-cpd-instance-details \
    --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} \
    --get_admin_initial_credentials=true

  4. Change the password of the default administrator:

    IBM Software Hub is integrated with the Identity Management Service

    See Changing the administrator access credentials in the IBM Cloud Pak foundational services documentation:


    IBM Software Hub is not integrated with the Identity Management Service
    1. Log in to the web client as the default platform administrator.
    2. Click your avatar in the toolbar.
    3. Click Profile and settings.
    4. Open the Password tab.
    5. Enter the default password in the Current password field.
    6. Enter and confirm the new password.
    7. Click Save.