Reset lost VCenter 6.5/7.X root password
So you forgot your root password. No worries. This is an easy fix.
- Backup your VCenter (export the config)
- Find the name of the host the VCenter runs on.
- Connect to the host running the VCenter.
- Issue a shutdown command to the VCenter
- Wait for it to power down.
- Snapshot the VM. Def do some research on VCenter snapshots. If this is your ONLY vcenter its not a big deal and managing the snapshot is straight forward, but if you have external PSC’s, are operating in linked mode, etc, things can get crazy. If your operating in Linked mode I recommend that you power down ALL the vcenters, and snap them all prior to continuing. Its overkill – but if shiz gets crazy, you will be glad you did.
- Power on the VM and as its coming up press the E key to enter the GNU Grub edit menu.
- The second or third line down should look something like “linux /$photon”, find that line and add : “rw init=bin/bash” to the end of it (Without the quotes). It should look something like:
9. Press F10 to continue booting and then run this command : mount -o remount,rw /
10. Type the command passwd and then provide a new password
11. Type umount / and hit enter
12. Type reboot -f
13. Confirm you can login to the VAMI https://name:5480
14. Assuming you can get into the VAMI now with root, delete the snap from step 6.