Resetting the forgot root user password usually only takes a few simple steps that will help you through the process of resetting the root password and logging in with the new password.
To begin, restart your machine and select the kernel you want to boot into from the boot grub menu by pressing the 'e' key on your keyboard.

The following
kernel boot parameters will appear on the next screen; locate the line that
begins with (kernel=) and add the parameter (rd.break) at the end
as indicated, then click Ctrl + x.

You'll be taken to
emergency mode on the next screen; hit Enter to enter the shell prompt.
Now, double-check that you have read and write permissions on the sysroot
directory. It's mounted in read-only mode by default, which is denoted by the
letter ro.


Then, using the
following command, mount the root file system in read and write mode.



You've
successfully reset your root user password at this point. The only thing left
is to rename all of the files to reflect the correct SELinux contexts.



This usually takes
a few minutes, after which the system will reboot and prompt you to log in as
root using the new password.

Completed!
That’s it, the session was completed.
Comments
Post a Comment