How to set password for grub bootloader on Ubuntu?
Asked
Active
Viewed 1,886 times
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
- 207,228
Shubham Saini
- 101