In Linux, how does one modify the password of the root user?

Source: Internet
Author: User

In Linux, how does one modify the password of the root user?

In Linux, the root account is a very important account and the account with the highest permissions. But what if I forget the root password? You cannot reinstall the system. This is the best practice. In Linux, if you forget the root account password, you can change the password in single-user mode or other methods. Of course, the specific method has something to do with Boot Loader and the operating system. GRUB and LILO have different implementation methods. Boot Loader is a small program that runs before the operating system kernel runs. Through this small program, we can initialize hardware devices and build a map of memory space to bring the system's hardware and software environment to a suitable state, in order to prepare the correct environment for the final call to the operating system kernel. Next we will introduce how to change the root account password when I forget the root password in Red Hat Enterprise Linux 5: forcibly restart the Linux system and go to the following interface. you can press the up/down key, select an option and press "e.
Go to the GRUP interface below

Select the second one and press the e key,
Press the cursor to the left to go down, add single to the front of ro or root, press the Enter key, and then press the "B" key to start the Linux system to enter the single user mode

Enter passwd root to modify

After setting the new password, run the restart command to restart the system.

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.