Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require_singleuser_auth:update prose #12864

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,21 @@ checktext: |-

ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue

If this line is not returned, or is commented out, this is a finding.
In case the output does not match, check if the <tt>ExecStart</tt> directive is not overridden:

grep ExecStart /etc/systemd/system/rescue.service.d/*.conf

The output should contain two lines:
ExecStart=
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue

If the line is not returned in any of cases mentioned above, or is commented out, this is a finding.

fixtext: |-
Configure {{{ full_name }}} to require authentication for single-user mode.

Add or modify the following line in the "/usr/lib/systemd/system/rescue.service" file:
Add following two lines to the file "/etc/systemd/system/rescue.service.d/10-remediation.conf":

ExecStart=
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue

Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ ocil: |-
<pre>ExecStart=-/bin/sh -c "/sbin/sulogin; /usr/bin/systemctl --fail --no-block default"</pre>
{{%- endif %}}

In case the output does not match, check if the <tt>ExecStart</tt> directive is not overridden:
<pre>grep ExecStart /etc/systemd/system/rescue.service.d/*.conf</pre>
The output should contain two lines:
<pre>ExecStart=
{{% if product in ["fedora", "rhcos4", "sle12", "sle15", "slmicro5"] or 'ol' in families or 'rhel' in product -%}}
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue</pre>
{{%- else -%}}
ExecStart=-/bin/sh -c "/sbin/sulogin; /usr/bin/systemctl --fail --no-block default"</pre>
{{%- endif %}}


{{% if product not in ["ol8", "rhel8"] %}}
Then, verify that the rescue service is in the runlevel1.target.
Run the following command:
Expand All @@ -85,11 +96,12 @@ ocil: |-
fixtext: |-
Configure {{{ full_name }}} to require authentication in single user mode.

Add or update the following line in "/usr/lib/systemd/system/rescue.service":
Ensure that there are following two lines in <tt>/etc/systemd/system/rescue.service.d/10-remediation.conf</tt>:
<pre>ExecStart=
{{% if product in ["fedora", "sle12", "sle15", "slmicro5"] or 'ol' in families or 'rhel' in product -%}}
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell rescue</pre>
{{%- else -%}}
ExecStart=-/bin/sh -c "/sbin/sulogin; /usr/bin/systemctl --fail --no-block default"
ExecStart=-/bin/sh -c "/sbin/sulogin; /usr/bin/systemctl --fail --no-block default"</pre>
{{%- endif %}}

srg_requirement: '{{{ full_name }}} must require authentication upon booting into rescue mode.'
Loading