How to reset the tanzu_platform_admin password for Tanzu Hub
search cancel

How to reset the tanzu_platform_admin password for Tanzu Hub

book

Article ID: 410737

calendar_today

Updated On:

Products

VMware Tanzu Platform - Hub

Issue/Introduction

If you lose or forget the password for the tanzu_platform_admin user, you can use the following steps to reset it.

You will need bosh-cli and cf-uaac for these steps. Both should already be installed on the Opsman VM

Resolution

  1. Get the Tanzu Hub bosh deployment name
    • bosh deployments --column=name | grep hub-
  2. SSH into the registry VM
    • bosh -d hub-7d4fEXAMPLE8567 ssh registry/0
  3. Run the following commands on the registry VM to get the ensemble_user_service secret
    • export PATH=$PATH:/var/vcap/packages/yq/bin
    • kubectl get secret tp-uaa-config -n tanzusm -o jsonpath='{.data.uaa\.yml}' | base64 -d | yq .oauth.clients.ensemble_user_service.secret
  4. Copy the secret and exit out of the registry VM
  5. Log into Tanzu Hub UAA with uaac. The UAA URL should be https://<YOUR_HUB_DOMAIN>/auth
    • uaac target https://hub.example.com/auth
    • uaac token client get ensemble_user_service -s <SECRET_FROM_STEP_3>
  6. You can now reset the password for tanzu_platform_admin
    • uaac password set tanzu_platform_admin