1

I'm attempting to password protect EDITING of the grub menu on boot. I've generated a hash for the password with grub-mkpasswd-pbkdf2 and entered the following in the /etc/grub.d/40_custom file:

set superusers="grubadmin"
password_pbkdf2 grubadmin grub.pbkdf2.sha512.10000.874B9326A498Y237D4923.....

Then, after I ran update-grub and rebooted.. I noticed that even automatically booting into the default kernel is asking for a password. I was under the impression that this password is only for EDITING the grub menu, which is what I want to accomplish. The server should boot into the default kernel without a password requirement. What am I doing wrong? I am running Ubuntu 14.04.5.

0

Grub is operating as designed. This article describes it in detail:

When a menu item requiring a password is selected, the user will be prompted to enter the correct username and password. If entered correctly, the selected menuentry will continue to boot. If incorrect, the user will be returned to the GRUB 2 menu.

  • Thank you for the clarification! I was hoping there may have been a workaround. – Mike D Apr 13 '18 at 16:07
  • You're welcome. As a new user I'll point out it is helpful to others when you click green check mark beside the answer. You can also upvote any answer you like anywhere on this site. Thanks. – WinEunuuchs2Unix Apr 13 '18 at 17:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.