Linux system root user forgot password reset method

Source: Internet
Author: User

If you accidentally forget the root password of the newly installed lCentOS7, we will now share the recovery process with you.

1. First, in the Boot Grub menu, select the Edit option to start:

2. Then press E to enter edit mode:

3. Change the ' Linux 16 ' line ' ro\ ' to ' RW init=/sysroot/bin/sh ' such as:

4. Press Ctrl+x to start using single-user mode:

  1. 5. Enter passwd to modify the new password

Enter the modified password at the first red line, and enter the password again at the second red Thread.

6. Restart the virtual machine and log in with the new password to succeed

Input: Exec/sbin/init 5 (restart)

Linux system root user forgot password reset method

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.