1.4.2 Ensure bootloader password is set

Information

Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off SELinux at boot time).

Error, bootloader not found in the following locations:

/boot/grub/grub.conf
/boot/grub/grub.cfg
/boot/grub/menu.lst
/boot/grub2/grub.conf
/boot/grub2/grub.cfg
/boot/grub2/menu.lst

Solution

For grub2 based systems create an encrypted password with grub-mkpasswd-pbkdf2:

# grub-mkpasswd-pbkdf2
Enter password: <password>
Reenter password: <password>
Your PBKDF2 is <encrypted-password>

Add the following into /etc/grub.d/00_header or a custom /etc/grub.d configuration file:
cat <<EOF
set superusers='<username>'
password_pbkdf2 <username> <encrypted-password>
EOF

Run the following command to update the grub2 configuration:
# update-grub

See Also

https://workbench.cisecurity.org/files/1856

Item Details

Category: SYSTEM AND INFORMATION INTEGRITY

References: 800-53|SI-7, CSCv6|5.1

Plugin: Unix

Control ID: 2e3d6c981529def4056c01646ad16a804a87909929b4d11a5a4f3b1ff716d6c2