+3 votes
263 views
How to reset root password RHEL 8

in Linux / Unix by (552k points)
reopened | 263 views

1 Answer

+4 votes
Best answer

How to reset root password in Red Hat 8

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:

 

image

 

 

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":

 

image

 

 

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 
image

 

 

Step 4

Now we are going to mount the directory again with the read and write permissions:
 mount -o remount, rw / sysroot / 
image

 

 

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 
image

 

 

Step 6

Now we are going to grant read and write permissions to the root file:
 chroot / sysroot 
image

 

 

Step 7

Once there we are going to execute the command "passwd" to enter and confirm the new password:

 

 

image

 

 

Step 8

Finally we are going to relabel the filesystem by executing the following line:
 touch /.autorelabel 
image

 

Step 9

Finally we execute "exit" and then "logout" to restart Red Hat 8:

 

image

 

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.

 


by (3.5m points)

Related questions

+5 votes
1 answer
asked Apr 2, 2020 in Linux / Unix by backtothefuture (552k points) | 262 views
+3 votes
1 answer
asked Apr 27, 2020 in Linux / Unix by backtothefuture (552k points) | 445 views
+5 votes
1 answer
asked Sep 2, 2020 in Linux / Unix by backtothefuture (552k points) | 2k views
+4 votes
1 answer
asked Jul 2, 2020 in Linux / Unix by backtothefuture (552k points) | 492 views
+3 votes
1 answer
asked Mar 31, 2020 in Linux / Unix by backtothefuture (552k points) | 351 views
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users