Rhel7 and Centos7 Retrieve the root password and rhel6 and centos6 retrieve the root password.

Source: Internet
Author: User

First step: When you start the Grub menu, press E to enter edit mode ...

Step Two: Locate the Linux 16 line and change the RO to RW init=/sysroot/bin/sh

Step three: Press Ctrl+x to start with single user mode


Step Fourth: You can use the following command to access the system

Chroot/sysroot

Fifth Step: Reset Password

passwd Root

Sixth step: Update system Information

Touch/.autorelabel

Seventh Step: Exit Chroot

Exit

Step eighth: Reboot your system

Reboot

You can change the CENTOS7 root password after a few steps above.



As for CENTOS6 and Rhel6, it's easy to mention (6 and 7 are not the same way to retrieve the password)

Also, when you start grub, press E into edit mode to find quiet to add single or number 1.

Press ENTER,

Then you'll go back to Grub's interface by pressing B. Enter Single user mode

Typing passwd root can modify the password

And then typing the reboot command to reboot the system,

Just typing a new command.

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.