Information
AlmaLinux OS 9 must require authentication to access emergency mode.
GROUP ID: V-269136
RULE ID: SV-269136r1137691
This requirement prevents attackers with physical access from easily bypassing security on the machine and gaining root access.
Such accesses are further prevented by configuring the bootloader password.
Solution
Configure AlmaLinux OS 9 to require authentication for emergency mode.
Add or modify the following line in the "/usr/lib/systemd/system/emergency.service" file:
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency
"sudo systemctl edit emergency.service" can also be used to create a "/etc/systemd/system/emergency.service.d/override.conf" file.