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: e4c9713706073254b6f61157729fd6de550a6aca65542616dc6a879e459a7138