vCenter Root Password Reset

on Feb. 17, 2023, 3:32 p.m.

1. Take a snapshot or backup of the vCenter Server Appliance before proceeding.
2. Reboot the vCenter Server Appliance.
3. After the VCSA Photon OS starts, press the e key to enter the GNU GRUB Edit Menu. Locate the line that begins with the word Linux. Append these entries to the end of the line:
rw init=/bin/bash
4. Press F10 to continue booting.
5. Run the commands
mount -o remount,rw /
umount /
reboot -f

6. Confirm that you can access the vCenter Server Appliance using the new root password.
7. Remove the snapshot taken in Step 1 if applicable.

NOTE: You could set the Root password to never expire in order to prevent this issue by running command below or at the VAMI ( https://:5480)

chage -I -1 -m 0 -M 99999 -E -1 root

ref: source