Reset root/admin password for HCX Connector or Cloud Manager till 4.3.x
search cancel

Reset root/admin password for HCX Connector or Cloud Manager till 4.3.x

book

Article ID: 321577

calendar_today

Updated On:

Products

VMware HCX

Issue/Introduction

Unable to access HCX Connector or Cloud Manager with "admin" or "root" account.
Error "Invalid credentials"

 

 

Environment

VMware HCX 4.3 or earlier

Cause

  • Resetting a lost or forgotten root/admin password for HCX Connector or Cloud Manager appliance.
  • Known issue when using some special characters ( i.e. '&' or '*' ) during initial deployment of HCX Connector or Cloud Manager with service update R139. 

Resolution

The issue with using special characters has been resolved in service update R140.

Workaround:

The following steps can be followed to reset root/admin password in the HCX Connector or Cloud Manager.
IMPORTANT: The procedure is subject to change based on the Linux flavor and version used to boot the system in single-user mode. In this example, Ubuntu 20.04 Desktop, so make sure to get up to date information from public sources for the Linux type and version of choice.

  1. Download the Ubuntu .iso file from http://releases.ubuntu.com/ - Ubuntu 20.4 Desktop in the test.
  2. Launch the vSphere or ESXi graphical user interface (GUI).
  3. Upload the Ubuntu .iso file into the accessible datastore for the HCX Manager VM.
  4. Shut down the HCX Manager appliance.
  5. Edit the settings of the HCX Manager VM and add a CD ROM Drive device if it does not exist.
  6. In the CD ROM Drive configuration, check the Connect at power on checkbox.
  7. In CD/DVD Media, press Browse and select ubuntu-xxxx.iso from the accessible datastore.
  8. Click Save to exit the Edit settings page.
  9. Power on the HCX Manager appliance.
  10. Pres Esc to access Boot Menu and select CD-ROM Drive as the boot device.                                       
  11. On next, select Try Ubuntu without installing but do not press "enter" and press "F6" to get below option                             
  12. Press "ESC" to drop into the CLI. Enter systemd.unit=rescue.target to end of the boot options.                                                               
  13. Press "Enter" and "Crtl+C" to cancel file system check.                                                             
  14. Press "Enter" to continue to maintenance mode and enter below to reset root password. Do not enter "Ctrl+d" option as it will boot into normal mode. 

                
mount /dev/sda2 /mnt
mount --bind /dev /mnt/dev
chroot /mnt
passwd
exit
umount /mnt/dev
umount /mnt
sync
exit
15. The above steps may need to be performed also for partition /dev/sda3
16. To reset admin password use: passwd admin.
17. Reboot the appliance and login with the new password.
 


Additional Information

The password recovery procedure may vary depending on the Linux flavor.
In this example, Ubuntu 20.04 Desktop was used.
Refer to KB 89212 for PhotonOS base HCX Connector/Cloud Manager password recovery.

Impact/Risks:
Unable to login to HCX Connector or Cloud Manager using "admin" and/or "root" account to perform administrative tasks. There is NO impact to HCX services while access remains forbidden.
The recovery procedure, which requires a reboot of the HCX Connector or Cloud manager, it should NOT impact:
  • Network Extension services
  • DR Protections
  • Migration workflows in the transfer phase or "waiting for switchover"
Active migration and configurations workflows may be impacted so those must be allowed to complete before proceeding to recover the password.