The Linux user password is vital for security issues in any operating system, but in the case of Linux or UNIX operating systems it is an issue that increases in terms of risk since there we have a special user who is the root user. which integrates by default all the management and control permissions on the entire computer, this user as a general rule this user is disabled (for security). The root password allows there to be a retaining wall against possible unwanted entries to our computers that could also damage their content..
But if for some reason we have enabled this user for administrative reasons and we want to access it again, most likely, we have forgotten the initial password , if this is the case, TechnoWikis has designed this tutorial where you will learn how to recover root password RHEL 8 a delicate and essential system such as Red Hat 8.
Next, we can see the process to be able to reset the RHEL 8 root password and thus access the system with the necessary permissions..
How to reset root password in Red Hat 8
Step 1
For this, we must turn on or restart the computer and on the initial screen select the line where the current system is located:
Step 2
Press the "e" key to access the GRUB editor (bootloader) and in the following window we locate the line that begins with "hkernel" and at the end of it we set the value "rd.break":
Step 3
We use the following keys to access the start in simple mode with console.
There we must mount the sysroot directory with read and write permissions (by default it only has read permissions), for this we execute the following line:
Ctrl + X
mount | grep sysroot
Step 4
Now we are going to mount the directory again with the read and write permissions:
mount -o remount, rw / sysroot /
Step 5
Now we are going to validate the access rights, these must be modified from ro (read only) to rw (read and write), we execute the following:
mount | grep sysroot
Step 6
Now we are going to grant read and write permissions to the root file:
chroot / sysroot
Step 7
Once there we are going to execute the command "passwd" to enter and confirm the new password:
Step 8
Finally we are going to relabel the filesystem by executing the following line:
touch /.autorelabel
Step 9
Finally we execute "exit" and then "logout" to restart Red Hat 8:
After this we will be able to access Red Hat with the root password that we have established with the process that we have explained in TechnoWikis after knowing how to reset the Root RHEL 8 password.