Disabling the default IBM Software Hub Administration Console administrator

If you are using an enterprise-grade LDAP server for user management in IBM Software Hub Administration Console (Control Center), you can further secure your Control Center system by disabling the default administrator, cpadmin.

Who needs to complete this task?

Cluster administrator A cluster administrator must complete this task.

When do you need to complete this task?
Complete this task if you want to remove the default Control Center administrator.

Before you begin

Best practice: You can run the commands in this task exactly as written if you use set up environment variables for IBM Software Hub Control Center. For instructions, see Setting up environment variables for IBM Software Hub Control Center

In addition, ensure that you source the environment variables before you run the commands in this task.

Procedure

To disable the default platform administrator:

  1. Log in to the Red Hat® OpenShift® Container Platform cluster:
    ${CONTROL_OC_LOGIN}
    Remember: CONTROL_OC_LOGIN is an alias for the oc login command when you are connecting to the Control Center cluster.
  2. Disable the default administrator:
    oc exec -it -n ${CONTROL_PROJECT_OPERANDS} \
    $(oc get pod -n ${CONTROL_PROJECT_OPERANDS} -l component=usermgmt | tail -1 | cut -f1 -d\ ) \
    -- bash -c "/usr/src/server-src/scripts/manage-user.sh --disable-user cpadmin"

What to do next

If you encounter a problem and cannot log in to the Control Center web client with any of your LDAP user names, you can re-enable the admin user. For example, you might need to do this if there is a connectivity issue with your LDAP server or IDP server.

To re-enable the default password administrator:

  1. Log in to the Red Hat OpenShift Container Platform cluster:
    ${CONTROL_OC_LOGIN}
    Remember: CONTROL_OC_LOGIN is an alias for the oc login command when you are connecting to the Control Center cluster.
  2. Enable the default administrator:
    oc exec -it -n ${CONTROL_PROJECT_OPERANDS} \
    $(oc get pod -n ${CONTROL_PROJECT_OPERANDS} -l component=usermgmt | tail -1 | cut -f1 -d\ ) \
    -- bash -c "/usr/src/server-src/scripts/manage-user.sh --enable-user cpadmin"
  3. When prompted, specify a new password for the default Control Center administrator.