madaidans-insecurities / madaidans-insecurities.github.io

https://madaidans-insecurities.github.io/
136 stars 28 forks source link

Grub password not working as described #76

Open cristianrz opened 1 year ago

cristianrz commented 1 year ago

On the linux hardening page, section 21.3.1

https://madaidans-insecurities.github.io/guides/linux-hardening.html#grub

It says

Create /etc/grub.d/40_password and add: [...]

If I do that I get /etc/grub.d/40_password: 2: password_pbkdf2: not found

Those files seem to be meant to be executed, hence

cat << EOF
set superusers="root"
password_pbkdf2 root grub.pbkdf2.sha512.......
EOF

and update-grub seems to work:

# grep -e password -e superuser /boot/grub/grub.cfg
### BEGIN /etc/grub.d/40_password ###
set superusers="root"
password_pbkdf2 root grub.pbkdf2....
### END /etc/grub.d/40_password ###