If your root account is locked or you simply forgot your password, I’ll show you the steps needed to change your root password on Photon OS appliances.
First off, connect to your vSphere Client and open the appliance virtual machine console and go to VM > Power > Restart Guest OS to restart the appliance.
Open the console and wait until the virtual machine rebooted. When the Photon operating system command line window appears, enter
e and press the Enter key to open the GNU GRUB boot menu editor.
At the grub menu append the following to the end of the boot loader line to boot into single-user mode and Press F10 or CTRL+X to continue the boot process:
To reset the root password just type the passwd command and enter the new password:
You can also validate the password is not locked out and unlock if necessary:
root [/]# prompt, enter reboot -f and press the Enter key to complete the root password reset process.