Recover Root Password
Warning
This is not well written as of now. It is just a set of instruction which might be clear to advanced users only.
Inorder to recover the root password we need to login into system in rescue mode. This is only possible if we have physical access to the device.
-
Restart the computer in rescue mode The grub menu appears during the restart, and only for a very short time, and hence we need to be vigilant to get that screen. Once the grub menu appears, press e to edit the selection, which is the name of our Linux.
-
- edit where
ro
is written torw init=/sysroot/bin/sh
and press CTRL-X chroot /sysroot
passwd root
- Before exiting update selinux information by running the command
touch /.autorelabel
exit
reboot
- edit where
Also see 14-Recover+Root+Password.pdf