After grub2 password version 1.97-beta is set, GRUB2 supports setting the boot password. You can directly modify/boot/grub. cfg. Of course, it is best to change/etc/grub. d/00_head: add cat & lt; EOFsetsuperusers & quot; user1 & quot; passworduser1 after setting grub2 password version 1.97-beta, GRUB2 supports setting the boot password. You can directly modify/boot/grub. cfg. Of course, it is best to change/etc/grub. d/00_head: add cat <EOFset superusers = "user1" password user1 PasswordOfUser1EOF at the end, after grub is upgraded, the configuration file generated by grub-mkconfig automatically contains the boot password, instead of changing grub every time. cfg file. Note: If you have set a plaintext password, make sure that the password is/etc/grub. d/00_head file and/boot/grub. the cfg file has no rw permission except root. After version 1.98, GRUB2 can set an encrypted password. Generate an encrypted password with a grub-mkpasswd-pbkdf2 (an encryption tool based on the pbkdfv2 algorithm ). Then, to/etc/grub. d/00_head append: cat <EOFset superusers = "user1" password_pbkdf2 user1 EncryptedPasswordOfUser1EOF use the update-grub command to make the modification take effect. restart the machine and enter "e" in the grub boot ", you need to enter the user name and password to enter. This setting is mainly used to prevent others from modifying your root password through restart.
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