Add Password to Grub

Source: Internet
Author: User

Run the command grub-md5-crypt and enter the password at the prompt. automatically give the password.

650) this.width=650; "title=" 6.png "src=" Http://s3.51cto.com/wyfs02/M00/72/CE/wKioL1XtohzSlOUtAABzsVU2pmY236.jpg " alt= "Wkiol1xtohzsloutaabzsvu2pmy236.jpg"/>

$1$TZ4TP$XYSOZ6O6TDPRW/T1WKNVT1 # Copy the password,

Vi/etc/grub.conf

Default=0

timeout=2

Title CentOS 6 (2.6.32-504.el6.x86_64)

password--md5 $1$TZ4TP$XYSOZ6O6TDPRW/T1WKNVT1 # Add here is the password to edit the Grub menu

Root (hd0,0)

kernel/vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/sda1

Initrd/initramfs-2.6.32-504.el6.x86_64.img

password--md5 $1$TZ4TP$XYSOZ6O6TDPRW/T1WKNVT1 # Add here is the boot password to start the kernel version

Reboot the system and you will find the contents of the Grub menu changed. Such as.

650) this.width=650; "style=" Float:none; "title=" 7.png "src=" http://s3.51cto.com/wyfs02/M01/72/CE/ Wkiol1xto1jgtehqaadk4p84rcq168.jpg "alt=" Wkiol1xto1jgtehqaadk4p84rcq168.jpg "/>

Enter P and you will be prompted for the password, which is the password to modify the Grub boot menu.

If you do not need to modify the Grub boot, press Enter and the prompt for the password will appear again, such as:

650) this.width=650; "style=" Float:none; "title=" 8.png "src=" http://s3.51cto.com/wyfs02/M01/72/D1/ Wkiom1xtos6sby9raaacybcetec916.jpg "alt=" Wkiom1xtos6sby9raaacybcetec916.jpg "/>

This is asking us to enter the password to start the kernel of this version.

Enter the correct password in order to start Linux

Add Password to Grub

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.