1.5.3 Set Boot Loader Password

Information

Setting the boot loader password will require that anyone rebooting system must enter a password before being able to set command line boot parameters

Rationale:

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).

Solution

Run the following:

#!/bin/bash
grub-md5-crypt | tee /tmp/$$
x=$(tail -1 /tmp/$$)
/bin/rm -f /tmp/$$
ed /etc/grub.conf << END > /dev/null 2>&1
g/^password/d
$
?^#?
a
password --md5 $x
.
w
q
END

Default Value:

OS Default: No

See Also

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

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6, CSCv7|5.1

Plugin: Unix

Control ID: 4dd40361da321c0875bbfb15dfcc01a8c9c421b448c2fdd22187c701ccd778d7