Encrypt your GRUB passwords for better security

The previous post was a tutorial on how to enable or password protect the GRUB. But I think it is not complete. The passwords will be  stored as plain
text if you perform the changes given in the previous post. In order to encrypt those passwords you must generate an encrypted version for each. For
this we use grub-mkpasswd-pbkdf2

g2_grub.pbkdf2

1. Open the terminal
2. Run the following command
 grub-mkpasswd-pbkdf2
3. Enter the desired password and reenter it when prompted.
4. Copy the resulting code
5. The format for an encrypted password entry in /etc/grub.d/00_header would look similar to the following
set superusers=”root”
    password_pbkdf2 root <paste_the_code_starting_with grub.pbkdf2.sha512.>
Note:- You must replace the line password root 123456 with the bove line if you had one(as it is clear).
6. Save the file and run sudo update-grub

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s