Reset root/admin password for PhotonOS based HCX Manager
search cancel

Reset root/admin password for PhotonOS based HCX Manager

book

Article ID: 321638

calendar_today

Updated On:

Products

VMware HCX VMware Cloud on AWS VMware vSphere ESXi

Issue/Introduction

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

Environment

HCX 4.4 or later

Cause

Resetting a lost or forgotten root/admin password for PhotonOS based HCX Connector or Cloud Manager appliance.

Resolution

Follow these steps to reset the root or admin password in the HCX Connector or Cloud Manager:

  1. Launch the vSphere or ESXi graphical user interface (GUI).
  2. Shut down the HCX Connector or Cloud Manager Appliance.
  3. Take a snapshot of the HCX Manager VM.
  4. Power on the HCX Manager Appliance.
  5. After the HCX Manager Photon OS starts, press the e key to enter the GNU GRUB Edit Menu.
  6. Locate the line that begins with the word Linux.
  7. Append these entries to the end of the line:
    rw init=/bin/bash


    In HCX version 9.x, the GRUB menu will look like this:

  8. Press F10 or Ctrl - x to boot with the changed entry.
  9. Run the following command:
    mount -o remount,rw /
  10. In the command prompt, enter the passwd command and provide a new root password (re-type the new password when prompted):
    passwd
  11. Unmount the filesystem by running this command (the unmount command is umount - it's not a spelling error):
    umount /
  12. Reboot the HCX Manager Appliance by running this command:
    reboot -f
  13. To reset the admin password, follow the same steps as above but use the command
    passwd admin:
  14. Reboot the appliance and log in with the new password.

Additional Information

Refer to HCX - Reset root/admin password for HCX Manager for earlier HCX version password recovery.

Impact/Risks:

You may be unable to log in to the PhotonOS-based HCX Connector or Cloud Manager using the admin and/or root accounts to perform administrative tasks. There is no impact to HCX services while access remains forbidden.

The recovery procedure requires a reboot of the HCX Connector or Cloud Manager. It should not impact the following:

  • Network Extension services
  • DR Protections
  • Migration workflows in the transfer phase or "waiting for switchover"

Active migration and configuration workflows may be impacted. You must allow these to complete before proceeding to recover the password.