How to Set Up a GRUB Password
What is the GRUB password?
Wiki topics:
🔓 · Open Source
How to Set Up a GRUB Password
What is the GRUB password?
GRUB passwords protect against unauthorized modification of boot entries or accessing the command line. In simple terms, on reboot, pressing ESC displays the Rescue Target menu. If we press ‘e’ for edit on a menu item, it should prompt for credentials.
Steps for setting up a GRUB password:
- ls /boot/grub2/ — There will be no user.cfg file
- grub2-setpassword (RHEL/CentOS) or grub-mkpasswd-pbkdf2 and adding it to /etc/grub.d/40_custom (Ubuntu/Debian) set GRUB password.
- ls /boot/grub2/ — There will be a user.cfg file, which will contain the credentials.
- To remove the GRUB password, delete the user.cfg file.
These methods typically prevent editing boot parameters, not necessarily booting the system itself, unless explicitly configured.
GRUB passwords are best used with BIOS/UEFI passwords for full protection.
메타데이터
- post_id
- 80d4d3a7c0b3
- slug
- how-to-set-up-a-grub-password-80d4d3a7c0b3
- url
- https://medium.com/@chandankush132/how-to-set-up-a-grub-password-80d4d3a7c0b3
- canonical_url
- https://medium.com/@chandankush132/how-to-set-up-a-grub-password-80d4d3a7c0b3
- author_url
- https://medium.com/@chandankush132
- status
- ok
- fetched_at
- 2026-06-17 08:20:12