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

RHEL now checks no other users have primary group ID 0 #12891

Merged
merged 1 commit into from
Jan 24, 2025
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 @@ -3,7 +3,7 @@
{{{ oval_metadata("The root account should have primary group of 0") }}}
<criteria operator="AND">
<criterion comment="tests that the root account's gid is equal to 0" test_ref="test_{{{rule_id}}}" />
{{% if 'ubuntu' in product %}}
{{% if 'ubuntu' in product or 'rhel' in product %}}
<criterion comment="no other users have primary group ID 0" test_ref="test_{{{rule_id}}}_no_other_gid_0" />
{{% endif %}}
</criteria>
Expand All @@ -24,7 +24,7 @@
<ind:subexpression operation="equals" datatype="int">0</ind:subexpression>
</ind:textfilecontent54_state>

{{% if 'ubuntu' in product %}}
{{% if 'ubuntu' in product or 'rhel' in product %}}
<!-- Test for other users with GID 0 (excluding sync, shutdown, halt, operator) -->
<ind:textfilecontent54_test id="test_{{{rule_id}}}_no_other_gid_0" check="all" check_existence="none_exist" comment="test that there are no other accounts with GID 0 except root" version="1">
<ind:object object_ref="object_{{{rule_id}}}_no_other_gid_0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

# platform = multi_platform_rhel,multi_platform_ubuntu
# Remediation doesn't fix the rule, only locks passwords
# of non-root accounts with uid 0.
# remediation = none
Expand Down
Loading