Reset/Unlock UAG Root account or any Photon OS virtual appliance

Perform the following steps to rest root password:

  1. Restart the Server…this need to be done from within the vsphere or Hyper-V management console
  2. . When the Photon OS splash screen appears as it restarts, type the letter ‘e' to go to the GNU GRUB edit menu quickly. Because Photon OS reboots so quickly, you won’t have much time to type e.
  3. Note : Remember that in vSphere and Workstation, you might have to give the console focus by clicking in its window before it will register input from the keyboard.

4. in the GNU GRUB edit menu, go to the end of the line that starts with linux, add a space, and then add the following code exactly as it appears below:

rw init=/bin/bash

Note : in some cases when you add the mentioned text and proceed with boot, boot will stuck and will not continue …in this case redo the above steps and add the mentioned test right after “$rootpartition” and delete the rest of the line.

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

The modified GNU GRUB edit menu

Now type F10 or Ctrl -x

6. At the command prompt, type passwd and then type (and re-enter) a new root password that conforms to the password complexity rules of Photon OS. Remember the password.

7. To reset the count, before you unmount the filesystem, run the following…

/sbin/pam_tally2 --reset --user root

8. Next, type the following command to finish and restart:

umount /

Finally, type the following command. You must include the -f option to force a reboot; otherwise, the kernel enters a state of panic.

reboot -f

After the Photon OS machine reboots, log in with the new root password.

note :if you have an issue to connect to UAG with SSH …use the link below to reconfigure SSH

https://vmware.github.io/photon/assets/files/html/3.0/photon_troubleshoot/permitting-root-login-with-ssh.html

Leave a Reply

Your email address will not be published. Required fields are marked *