Lab 5.3 - Update User Password from the Secret

1. Login as admin user

oc login -u admin -p rahasia

2. Generate a random user password.

openssl rand -hex 15

3. Store the password created in MANAGER_PASSWD env


4. Update the manager user with the password

htpasswd -b /root/temp manager ${MANAGER_PASSWD}

5. Update the secret

oc create secret generic htp-secret \
  --from-file htpasswd=/root/temp --dry-run=client -o yaml \
  | oc replace -n openshift-config -f -

6. Log in as the manager user to verify the updated password

oc login -u manager -p ${MANAGER_PASSWD}