ROS (Robot Operating System)
TMA-ROS1-1.5.2
Ensure bootloader password is set
Description
Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters The audit requires "set superusers" and a password_pbkdf2 entry in /boot/grub/grub.cfg. Host-level control from the CIS ROS Melodic benchmark (Ubuntu 18.04 robot hosts); run as root.
How it is checked
Audit method: Shell command
f=/boot/grub/grub.cfg; [ -r "$f" ] || exit 1
grep -q '^set superusers' "$f" || { echo 'no superusers in grub.cfg'; exit 1; }
grep -Eq '^\s*password(_pbkdf2)?\s' "$f" && echo compliant || echo 'no bootloader password in grub.cfg'- Expected output
compliant
How it is fixed
Fix method: Guidance or infrastructure patch
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 a custom /etc/grub.d configuration file: cat <<EOF set superusers="<username>" password_pbkdf2 <username> <encrypted-password> EOF ** The superuser/user information and password should not be contained in the /etc/grub.d/00_header file as this file could be overwritten in a package update.** If there is a requirement to be able to boot/reboot without entering the password, edit /etc/grub.d/10_linux and add --unrestricted to the line CLASS= Example: CLASS="--class gnu-linux --class gnu --class os ...
Properties
- Operating systems
- Any
- Tags
- rosros1melodicsystem
- Reference
- CIS ROS Melodic Benchmark v1.0.0 - 1.5.2 Ensure bootloader password is set
Check this host
Run this on a machine you are allowed to audit. The scan is read-only.
tmaegis scan --target ros