-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update require_singleuser_auth for RHEL
Don't modify /usr files they are controled by the operating system.
- Loading branch information
Showing
4 changed files
with
24 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 3 additions & 9 deletions
12
linux_os/guide/system/accounts/accounts-physical/require_singleuser_auth/bash/shared.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
# platform = multi_platform_all | ||
|
||
service_file="/usr/lib/systemd/system/rescue.service" | ||
|
||
{{% if product in ["fedora", "ol8", "ol9", "sle12", "sle15",] or 'rhel' in product -%}} | ||
sulogin="/usr/lib/systemd/systemd-sulogin-shell rescue" | ||
{{% set sulogin="/usr/lib/systemd/systemd-sulogin-shell rescue" %}} | ||
{{%- else -%}} | ||
sulogin='/bin/sh -c "/sbin/sulogin; /usr/bin/systemctl --fail --no-block default"' | ||
{{% set sulogin='/bin/sh -c "/sbin/sulogin; /usr/bin/systemctl --fail --no-block default"' %}} | ||
{{%- endif %}} | ||
|
||
if grep "^ExecStart=.*" "$service_file" ; then | ||
sed -i "s%^ExecStart=.*%ExecStart=-$sulogin%" "$service_file" | ||
else | ||
echo "ExecStart=-$sulogin" >> "$service_file" | ||
fi | ||
{{{ bash_ensure_ini_config("/etc/systemd/system/rescue.service.d/10-oscap.conf", "Service", "ExecStart", sulogin) }}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ide/system/accounts/accounts-physical/require_singleuser_auth/tests/correct_value.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters