Note: - VMware Cloud Gateway is a stateless appliance & doesn't support snapshot/backup.
- Reboot the Cloud Gateway Appliance.
- After the CGW 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
- The line should look like the following screenshot:

6. Press F10 to continue booting.
7. Run the command
mount -o remount,rw /
- In the Command prompt, enter the command passwd and provide a new root password (twice for confirmation):
passwd
- Unmount the filesystem by running this command (yes, the unmount command is umount - it's not a spelling error):
umount /
- Reboot the Cloud Gateway Appliance by running this command:
reboot -f
- Confirm that you can access the Cloud Gateway Appliance using the new root password.
- Remove the snapshot taken in Step 1 if applicable.
- You could set the Root password to never expire in order to prevent this issue by running the command: # chage -I -1 -m 0 -M 99999 -E -1 root or at the VAMI (https://<vcenter_fqdn>:5480)
Workaround:
Additionally, you can also try to login into the appliance via console/ssh.
- SSH into gateway appliance as root, feed in the old password. Shell forces to change the password.
- Enter the new password.