Linux root Password Modification

Source: Internet
Author: User

Restart the system.

Go to the system boot page:

Press the e key:

Select item 2, set the kernel startup parameters, and press the e key:

At the end, enter the number 1 or English "single" and press Enter:

Press the key B to start the instance.Single User Mode LevelBoot the program:


After the command is started, run passwd to change the password. After the modification, run exit to exit and restart. You can use the modified password for logon.

Problem: According to the above modification method, every user who has access to this system can change the root password. What should I do with root !!!

Solution: GRUB encryption.

How to Implement: In the grub. conf configuration file, configure the parameter password -- md5 xxxxxxxxxxxxxxxxxxxxxx

Procedure

Use the md5 Algorithm to generate a password:


Copy password.

Edit the/boot/grub. conf file

Configure the parameter password -- md5 password

Save and exit, and restart:


At this time, we found that the boot interface is slightly different from the boot interface that we entered for the first time. We need to enter the password. Press the p key:

Enter the password:

OK, so that we can go back to the first guide interface. Next we can follow the step of the first root password change.

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.