iT邦幫忙

0

How to Protect GRUB Bootloader with Password in RHEL 7

Follow the below steps to Protect the GRUB Boot loader with Password :

Step : 1
Open the Terminal and type below command.

grub2-mkpasswd-pbkdf2

It will ask to enter password, So enter the password twice.

Step : 2

After set the password the command will return a encrypted password which we have to set in 40_custom file which is located at /etc/grub.d/ Directory.

So now edit the file and set the encrypted password as shown below :

nano /etc/grub.d/40_custom

set superusers="root"
password_pbkdf2 root grub.pbkdf2.sha512.10000.FECBECE234528AAC47780D5B3C2A24E099DA822F6C9432407EE4A0B66EF5A691774C86E21CB6D9C19CFE96353E34475228286E25A6F12A42758B087F18D5D0F9.6C84C084FA82EEB9E9A239B752F76898C2667FB4FAB8F300A12353E1291DDA3D85F664F1CC546DFC17EB1F47765276078C3EA070F1F3B4EDCAB1F9629644CD81

After set the password update the GRUB file as shown below :

grub2-mkconfig -o /boot/grub2/grub.cfg

It's Done.

Now restart the system and edit the grub by press "e". System will ask for password, Here enter the password you have set on Step : 1

Source : http://www.elinuxbook.com/how-to-protect-grub2-bootloader-with-password-in-linux/


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言