Modify the root Superuser password of RHEL6

Source: Internet
Author: User
As we all know, in RHEL5, the root password modification method is relatively simple. In single-user mode, passwd can be modified successfully. However, this action does not work in RHEL6. Currently, there are three ways to modify it. Use a CD to enter the repair mode. I will not introduce this method here. Through network search and self-exploration, it is determined that there are two remedies in the virtual machine to solve the root resetting problem. The first skewness. (Similar to RHEL5) switch to single-user mode, disable selinux, and then you can

As we all know, in RHEL5, the root password modification method is relatively simple. In single-user mode, passwd can be modified successfully.

However, this action does not work in RHEL6.

Currently, there are three ways to modify it. Use a CD to enter the repair mode. I will not introduce this method here. Through network search and self-exploration, it is determined that there are two remedies in the virtual machine to solve the root resetting problem.

The first skewness. (Similar to RHEL5)

In single-user mode, disable selinux and then modify the settings.

Setenforce 0

Passwd

The second skewness. (This is a brutal method. I have not come up with any idea about this, but it is actually feasible)

Still enters the single-user mode. Modify the/etc/passwd file and delete x in the first line of root: x:. Enter level5 mode and log in with the root account (no password is required at this time ), now you can change the root password.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.