Hi
It asks password on each boot (even if it is regular boot via power button).
But i need to lock only GRUB menu and avoid password resets.
So my goal:
- Power button → normal boot (no password)
- If trying to access grub menu → ask password
Linux Mint 22, Cinnamon. One and only system (no dual boots needed).
Thanks for your attention!
hydn
2
Follow advice at your own risk, errors here can result in not being able to boot into your system. You have been warned:
To require a password only for editing/accessing GRUB menu (not normal boots):
Remove global GRUB password:
Edit /etc/grub.d/40_custom
or /etc/grub.d/00_header
and remove/comment out any set superusers
and password_pbkdf2
lines you previously added.
Generate a password hash:
grub-mkpasswd-pbkdf2
(copy the resulting hash)
Set user/password in /etc/grub.d/40_custom
:
set superusers="yourname"
password_pbkdf2 yourname <the-long-hash-from-grub-mkpasswd-pbkdf2>
Make boot entries unrestricted:
Edit /etc/grub.d/10_linux
, find lines starting with menuentry
, and add --unrestricted
to each.
Then:
sudo update-grub
Result:
Boots normally with no password. Password is only required to access/edit GRUB menu.
Have you heard of the Linux Mint forums? Also a great place to search for exisiting solutions: https://forums.linuxmint.com/
1 Like