How to Retrieve Auto-Generated Passwords from the VCF Installer Appliance
search cancel

How to Retrieve Auto-Generated Passwords from the VCF Installer Appliance

book

Article ID: 388719

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

If the VCF Installer UI is no longer accessible, we can pull the auto-generated passwords via CLI 

Environment

VCF Installer 9.0

Resolution

1. Log back into the VCF Installer UI: 

  • https://<fqdn-of-vcf-installer>/vcf-installer-ui/portal/getting-started
    • Under Deploy > View Details 

Then grab the passwords from the JSON on the installer page. 

2. Use curl commands to pull the passwords: 

  • SSH into the VCF Installer which should now be the SDDC Manager Appliance with the vcf user and su to root. 
  • Run the following commands:
    • Obtain the token:

TOKEN=$(curl -k -X POST https://localhost/v1/tokens -H 'Content-Type:application/json' -d '{"username": "admin@local","password": ""}' | jq -r '.accessToken')

    • Retrieve the ID of the latest deployment : 

curl -k -X GET "https://localhost/v1/sddcs/latest" -H "Authorization: Bearer $TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" | jq)

    • Grab the VCF Operations deployment JSON which contains the passwords: 

curl -k -X GET "https://localhost/v1/sddcs/<ID from previous command>/spec" -H "Authorization: Bearer $TOKEN" -H "Accept: application/json" -H "Content-Type: application/json" | jq | less   

Note: Can use an account such as [email protected] if the password to admin@local is unknown to obtain the token.