SV-281327r1167131_rule
V-281327
SRG-OS-000080-GPOS-00048
RHEL-10-701250
CAT II
10
Configure RHEL 10 to require authentication for emergency mode.
Create a directory for supplementary configuration files:
$ sudo mkdir /etc/systemd/system/emergency.service.d/
Copy the original "emergency.service" file to the new directory with:
$ sudo cp /usr/lib/systemd/system/emergency.service /etc/systemd/system/emergency.service.d/emergency.service.conf
Open the new file:
$ sudo vi /etc/systemd/system/emergency.service.d/emergency.service.conf
Add or modify the following line in the new file:
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency
Comment out or remove the ExecStart and ExecStartPre lines in "/usr/lib/systemd/system/emergency.service" as they can only exist in one location.
Apply changes to unit files without rebooting the system:
$ sudo systemctl daemon-reload
Verify RHEL 10 requires authentication for emergency mode with the following command:
$ sudo grep systemd-sulogin /usr/lib/systemd/system/emergency.service
# ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency
If the line is not returned from the default "systemd" file, use the following command to look for modifications to "emergency.service":
$ sudo grep systemd-sulogin /etc/systemd/system/emergency.service.d/*.conf
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency
If the line is not returned from either location, this is a finding.
Note: The configuration setting can be in either the default location or the drop-in file but not in both locations.
V-281327
False
RHEL-10-701250
Verify RHEL 10 requires authentication for emergency mode with the following command:
$ sudo grep systemd-sulogin /usr/lib/systemd/system/emergency.service
# ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency
If the line is not returned from the default "systemd" file, use the following command to look for modifications to "emergency.service":
$ sudo grep systemd-sulogin /etc/systemd/system/emergency.service.d/*.conf
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency
If the line is not returned from either location, this is a finding.
Note: The configuration setting can be in either the default location or the drop-in file but not in both locations.
M
5733