Get SSH Password for VCF Automation 9.0.x or VCF Identity Broker 9.0.x
search cancel

Get SSH Password for VCF Automation 9.0.x or VCF Identity Broker 9.0.x

book

Article ID: 412001

calendar_today

Updated On:

Products

VCF Automation VCF Operations

Issue/Introduction

This KB covers the process for getting the vmware-system-user passwords for VCF Automation or VCF Identity Broker from the VCF Operations Fleet Management

Environment

  • VCF 9.0.x
  • VCF Automation 9.0.x
  • VCF Identity Broker 9.0.x
  • VCF Operations 9.0.x

Cause

The Fleet Management > Passwords UI in VCF Operations does not allow for viewing password values.

Resolution

  1. Log in to VCF Operations UI and navigate to Fleet Management > Lifecycle > VCF Management > Components

  2. Click automation or identity broker

  3. Locate the desired node and click the Open button ( >> icon) to view node details

  4. Copy the password alias name listed next to Other > VMware System User Password

  5. Log in to the fleet manager appliance as root via SSH

  6. Assign the password alias copied in Step 4 to a variable

    pwAlias='<vmware-system-user pw alias>'

    Note: Replace <vmware-system-user pw alias> with the password alias copied in step 4

  7. Assign the Fleet Manager root password to a variable

    rootPW=$(systemd-ask-password "Enter Fleet Manager root user password: ")
  8. Assign the Fleet Manager admin@local password to a variable

    adminPW=$(systemd-ask-password "Enter Fleet Manager admin@local user password: ")
  9. Retrieve the vmid for the password alias via API

    vmid=$(curl -sSk -u "admin@local:$adminPW" "https://localhost/lcm/locker/api/v2/passwords?aliasQuery=$pwAlias" | grep -Po '(?<=vmid\":\")[^\"]+')
  10. Retrieve the password value for the password alias via API

    pwValue=$(curl -sSk -u "admin@local:$adminPW" -H "Content-Type: application/json" "https://localhost/lcm/locker/api/v2/passwords/$vmid/decrypted" -d '{"rootPassword":"'$rootPW'"}' | grep -Po '(?<=password\":\")[^\"]+'); echo ${pwValue:?}
  11. Unset variables

    unset pwAlias adminPW rootPW pwValue vmid
  12. Login using Chosen tool with vmware-system-user as the user and the selected password from the list above.