How to disable single-user mode in CentOS 5.5

Source: Internet
Author: User

Linux: CentOS 5.5

Enhance system security by adding a password to the grub boot loader, so as to disable the single-user mode and prevent malicious modification of the root password by logging on to the single-user mode, you only need to modify the configuration file of grub to encrypt grub.

1. Enter the system as the root user

2. Enter the grub-md5-crypt in the terminal, then the system will prompt to enter the same password twice, this password is your grub password, and then generate a string of MD5 code, follow these steps to add the grub configuration file.

3. Modify the grub configuration file

A) vim/boot/grub. conf

B) add a line of password-md5 MD5 code under the splashimage Parameter

4. Save and exit. Restart the reboot system. 5. If you want to enter grub after the restart, enter p and your grub password if you want to enter single-user mode, then you can edit grub (that is, you can enter e, add linux single after keenel, and then enter B to start a single user)

Note: You can also use the plaintext password to change one line of password to password = password.

You can.

Share it with everyone and learn together ......

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.