How to modify the root super user password of RHEL6

  

It is well known that in RHEL5, the method of modifying the root password is relatively simple. Only in single-user mode, passwd can be modified successfully.

But this trick is not working in RHEL6.

There are currently 3 ways to modify it. Among them, use the CD to enter the repair mode. I will not introduce this method here. Through network search and your own exploration, a certainty: In the virtual machine, there are two kinds of remedies to solve the root reset problem.

The first remedy. (very similar to the RHEL5 method)

Enter single-user mode, close selinux, and then you can successfully modify it.

setenforce 0 passwd second remedy. (Very savage method, I haven't figured out what makes sense, but it works) I still enter single-user mode. Modify the /etc/passwd file to delete the x in the first line root:x:; enter level5 mode, log in with the root account (no password is required at this time), and now you can change the root password.

Copyright © Windows knowledge All Rights Reserved