Perform the following steps to rest root password:
- Restart the Server…this need to be done from within the vsphere or Hyper-V management console
- . 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 typee
. - 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:
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