Problem setting Grub password on RHEL7
I'm sure I'm missing something very simple, but can someone help me with this?
Trying to set up a password so that the Grub menu can't be edited without authentication.
- grub2-mkpasswd-pbkdf2
Enter password:
Confirm password:
- Copy password hash
- Edit /etc/grub2/40_custom
set superuser="root"
password root - Save file
- grub2-mkconfig -o /boot/grub2/grub.cfg
After rebooting, I enter 'e' at the boot menu. It prompts me for the user (I enter 'root') and then it prompts me for the password (I enter
What am I missing? This seems like it's supposed to be much easier than all this.
Responses
UPDATED - It seems you may have used the below procedure, but just double check it...
UPDATED 2
I noticed this in Paragraph 24.3.1
Anyone can boot Red Hat Enterprise Linux
Server, because of the --unrestricted option,
but only john can edit the menu entry as a
superuser has been defined. When a
superuser is defined then all records are
protected against unauthorized changes
and all records are protected for booting if
they do not have the --unrestricted
parameter
I have not tried this, but look at:
- RHEL 7 sysadmin guide, paragraph 24.3. GRUB 2 Password Protection
- And see the subsequent entries that follow.
Hope this helps, let us know how it goes. Make a backup of your grub file.
UPDATE Use Ryan Sawhill's method here (and cited in his post below) https://access.redhat.com/solutions/979643
I've changed accounts since I posted the previous, above,
Hi Dan. I wrote an article about this a while back. Let me know if it helps you.
How to permanently password-protect standard RHEL7 menu entries in GRUB2
I've used Ryan Sawhill's method which is an update for more current versions of RHEL 7, so the grub2-mkpasswd-pbkdf2 is replaced by using the method in the article he cites above
Regards - RJ
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
