2

I've used the command grub-mkpasswd-pbkdf2 in order to encrypt my password, then I took the hashed password and placed it in my Ubuntu 14.04 /etc/grub.d/00_header:

cat << EOF
set superusers="itaig"
password itaig grub.pbkdf2.sha512.10000.blah.blah
set superusers="lel"
password lel P@ssw0rd
export superusers
EOF

And at the end I ran update-grub2 to update grub. After reboot, I get a password prompt, when I use the user with the encrypted password I get an error and I'm unable to log into grub to continue the boot process. When I use the user with the cleartext password I am able to log into grub and continue the boot process successfully. What could be the cause for this problem? Here's a screen shot of the relevant section of /etc/grub.d/00_header: enter image description here

The entry for user "lel" which has an unencrypted password works like a charm. Thanks

Itai Ganot
  • 10,644
  • 29
  • 93
  • 146

3 Answers3

1

you need to change your crypted password line

the entry should be

password_pbkdf2 itaig grub.pbkdf2.sha512.10000.bla.bla

see

Ubuntu Help

Dennis Nolte
  • 2,881
  • 4
  • 27
  • 37
0

I had the same problem. I'm not sure how I fixed it, but I configured /etc/grub.d/01_users file, and it works! See the sample below :

#!/bin/sh -e
cat << EOF
set superusers="root"
password_pbkdf2 root grub.pbkdf2.sha512......
EOF

I configured it on Centos 7

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89
0

I had found problem. I created a file without execute permission. I changed it to 755 and it works.

To ensure that worked, check de boot file config /boot/grub2/grub.cfg after update. You'll found configs similar that!

### BEGIN /etc/grub.d/11_users ###
set superusers="root"
password_pbkdf2 root grub.pbkdf2.sha512.10000....
### END /etc/grub.d/11_users ###