top of page
  • Writer's pictureSantosh Kumar Behera

How to Reset UAG Root account password or any Photon OS virtual appliance


In today's blog post, we will explore the steps to reset the root account password on a Unified Access Gateway (UAG) or any Photon OS-based virtual appliance. The root account is a crucial component of the system, and regaining access to it is essential in various scenarios such as forgotten passwords or locked accounts.

Following the simple steps mentioned below which will help you to reset and unlock the Root Password using GRUB

Resetting the Root Password using GRUB

Restart the UAG or Photon OS virtual appliance from the vSphere or Hyper-V management console and press the "e" keyboard key as soon as you see the Photon OS splash screen which looks like this:

Photon OS Splash Screen - Press 'e' when you see this screen.

After pressing the "e" the GNU GRUB edit screen will look like this as mentioned below.

In the GNU GRUB edit menu, go to the line that starts with linux and remove the rest of the first line (it kind of cuts into the second line due to it's length depending on console size) after root=$rootpartition ( highlighted in red box ), then add a space, and then add the following code exactly as it appears below:

rw init=/bin/bash

After you add this code, the GNU GRUB edit menu should look exactly like this:

Now Press F10 or Ctrl -X to boot with the modified parameters. This will allow you to boot straight into root shell access without having to enter any credentials.

bash command prompt use the standard 'passwd' command to set a new password for root.


New password:

Retype new password:

passwd: password updated successfully

Now Reboot the appliance reboot -f

Once the appliance rebooted, you'll be able to log in to your UAG appliance with the new root password.


Losing access to the root account can be a challenging situation, but with the methods outlined above, you can reset the root account on a UAG or any Photon OS virtual appliance. By following these step-by-step instructions, you'll be able to regain control and ensure smooth operation of your virtualized infrastructure. Remember to keep your passwords secure and readily accessible to authorized individuals to avoid such situations in the future.


bottom of page