Require Authentication for Single User Mode
An XCCDF Rule
Description
Single-user mode is intended as a system recovery method, providing a single user root access to the system by providing a boot option at startup.By default, single-user mode is protected by requiring a password and is set in
/usr/lib/systemd/system/rescue.service
.
Rationale
This prevents attackers with physical access from trivially bypassing security on the machine and gaining root access. Such accesses are further prevented by configuring the bootloader password.
- ID
- xccdf_org.ssgproject.content_rule_require_singleuser_auth
- Severity
- Medium
- References
- Updated
Remediation Templates
An Ansible Snippet
- name: Gather the package facts
package_facts:
manager: auto
tags:
- CCE-91428-3
- NIST-800-171-3.1.1
A Shell Script
# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel-default; then
found=false
# set value in all files if they contain section or key
for f in $(echo -n "/etc/systemd/system/rescue.service.d/10-oscap.conf"); do