CentOS 5.5 prohibits single-user mode approach

  
                

Under the CentOS system, if only single-user mode is used, there will be hidden dangers. The root password may be modified. By disabling the single-user mode, the security of the system can be improved. The following is a brief introduction to the CentOS 5.5 prohibition list. User mode approach.

Enhance system security by adding a password to the grub bootloader to disable single-user mode. Prevent malicious root password modification by logging in single-user mode. Just change the grub configuration file. Implement encryption on grub.

1. Enter the system as root user

2. Type grub-md5-crypt in the terminal. At this time, the system will prompt you to enter the same password twice. This password is your grub password. and MD5 code string is generated, which is added in the step of copying the configuration file to grub

3, the amount of grub profile modification

a) vim /boot /grub/grub.conf

b) add the following parameters splashimage line password & ndash; md5 MD5 code

4, save and exit, reboot the system to reboot

5, when entering grub after reboot, if you want to enter single-user mode, you must first enter p, enter your grub password, and then you can edit grub (that is, you can enter e, join linux single after keenel and then enter b to enter Single user)

Note: The grub password can also be used in clear text password, change the password line to password=password

The above is the method of CentOS 5.5 disable single user mode. Setting a password in grub can disable single-user mode, but To forget your password.

Copyright © Windows knowledge All Rights Reserved