Skip to content

Instantly share code, notes, and snippets.

@Maxim-Mazurok
Last active May 18, 2019 23:59
Show Gist options
  • Save Maxim-Mazurok/e7f8386a7b96a6fee581d067e5445770 to your computer and use it in GitHub Desktop.
Save Maxim-Mazurok/e7f8386a7b96a6fee581d067e5445770 to your computer and use it in GitHub Desktop.
Protect GRUB2 with password on CentOS
# Protect GRUB2 with password on CentOS:
#
# Tested (basic):
# 1. Run:
sudo grub2-setpassword # to set root password
# 2. Update GRUB config:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
#
# Not tested (advanced):
# 1. Run 'grub2-mkpasswd-pbkdf2' as root to generate encrypted password.
# 2. ... continue reading at https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-GRUB_2_Password_Protection.html says (extended version of tested solution)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment