How to set password for grub bootloader on Ubuntu?
Asked
Active
Viewed 1,716 times
0
-
1It is in the help section: https://help.ubuntu.com/community/Grub2/Passwords ? – Rinzwind Oct 01 '14 at 04:55
1 Answers
0
Username and password are added to the /etc/grub.d/40_custom
file. Use your favorite editor and add the following line:
password <<username>> <<password>>
Example:
password john johnP123
If you want to add a hashed password, use the *grub-mkpasswd-pbkdf2
utility to generate a hashed password. Add this hashed password to the /etc/grub.d/40_custom
file like this:
password_pbkdf2 <<username>> <<hashed-passwd>>
Save the file and run sudo update-grub
.

muru
- 197,895
- 55
- 485
- 740

Shubham Saini
- 101