This article explains how to reset the root password if it expires or is lost.
Prerequisites
Procedure
1. Restart gracefully the TKGi MC VM and wait for the Photon OS Splash screen during boot.
2.Enter 'e' to access GNU GRUB boot menu editor.
3. Add the below string behind the line that starts with linux: init=/bin/bash
4. Enter F10 to boot the changed Entry.
5. Verify if the OS filesystem is mounted as writable. See /dev/sda2 on / type ext4 (rw,relatime) at the last line (/dev/sda2 might be different in your installation).
6. (Optional) Remount the filesystem as read/write
mount -o rw,remount /
7. Reset root password with the passwd command.
8. Reboot the appliance with the reboot -f command.