{{{ oval_metadata("The requirement for a password to boot into emergency mode should be configured correctly.") }}} {{% if 'sle' in product %}} {{% endif %}} {{% if 'sle' in product %}} {{% endif %}}
<ind:textfilecontent54_test check="all" check_existence="all_exist" comment="Tests that {{% if product in ["fedora", "ol8", "ol9", "rhel8", "rhel9", "sle12", "sle15"] -%}} /usr/lib/systemd/systemd-sulogin-shell {{%- else -%}} /sbin/sulogin {{%- endif %}} was not removed from the default systemd emergency.service to ensure that a password must be entered to access single user mode" id="test_require_emergency_service" version="1"> /usr/lib/systemd/system/emergency.service {{%- if product in ["fedora", "ol8", "ol9", "rhel8", "rhel9", "sle12", "sle15"] -%}} ^ExecStart=\-/usr/lib/systemd/systemd-sulogin-shell[\s]+emergency {{%- else -%}} ^ExecStart=\-/bin/sh[\s]+-c[\s]+\"(/usr)?/sbin/sulogin;[\s]+/usr/bin/systemctl[\s]+--fail[\s]+--no-block[\s]+default\" {{%- endif -%}} 1

{{% if 'sle' in product %}} /etc/systemd/system/emergency.service.d `^.*\.conf$` ^ExecStart=\-/usr/lib/systemd/systemd-sulogin-shell[\s]+emergency 1 {{% endif %}}

/usr/lib/systemd/system/emergency.target
^Requires=.*emergency\.service
1
/etc/systemd/system
^emergency.service$
/etc/systemd/system
^emergency.target$