Set the grub2 password in ubuntu12.04

Source: Internet
Author: User
Why do we do this? we all know that the procedure is as follows: leekwen @ leekwen :~ Grub-mkpasswd-pbkdf

Why do we do this? the packages all know how to directly perform the following operations:

Leekwen @ leekwen :~ # Grub-mkpasswd-pbkdf2Enter password:
 <这里输入你的grub密码reenter password: <<<这里输入你的grub密码your pbkdf2 is grub.pbkdf2.sha512.10000.bc4d0a450e86ee447561fc822c832xxxxxxxxxxxxx45572d3b4e40500celeekwen@leekwen:~# cp etc grub.d 00_header 00_header.bakleekwen@leekwen:~# vi 00_headerleekwen@leekwen:~# tail -n 6 00_header### add those line to set grub2 password cat <
  
In this way, after the restart, when you press e for the startup item, you will be asked to enter:
  
username:password:
Only after the user name (for example, the user name I just set is: leekwen) and the password is correct (the password just generated with the grub-mkpasswd-pbkdf2) can enter the Edit menu of the startup item, this step is safe. remember to run the "update-grub" command after modifying the 00_header so that it will take effect !!!
Related Article

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.