Skip to content

Fix no_invalid_shell_accounts_unlocked for unlocked user in last line of /etc/passwd#14751

Merged
jan-cerny merged 1 commit into
ComplianceAsCode:masterfrom
guyy-claroty:fix-no_invalid_shell_accounts_unlocked-last-line
Jun 2, 2026
Merged

Fix no_invalid_shell_accounts_unlocked for unlocked user in last line of /etc/passwd#14751
jan-cerny merged 1 commit into
ComplianceAsCode:masterfrom
guyy-claroty:fix-no_invalid_shell_accounts_unlocked-last-line

Conversation

@guyy-claroty
Copy link
Copy Markdown
Contributor

When the last line in /etc/passwd is an unlocked user with a valid shell, the shell path was parsed as '/path/to/shell\n' instead of just '/path/to/shell' and the comparison to valid shells list failed.

Fixes: #13657

Description:

  • Description here. Replace this text. Don't use the italics format!

Rationale:

  • Rationale here. Replace this text. Don't use the italics format!

  • Fixes # Issue number here (e.g. Updating sysctl XCCDF naming #26) or remove this line if no issue exists.

Review Hints:

  • Review hints here. Replace this text. Don't use the italics format!

  • Use this optional section to give any relevant information which could help the reviewer to more quickly and assertively understand and test the changes.

  • Good examples are useful commands, if it is better to review all commits together or in a suggested sequence, any relevant discussion in other PRs or issues, etc.

… of /etc/passwd

When the last line in /etc/passwd is an unlocked user with a valid shell,
the shell path was parsed as '/path/to/shell\n' instead of just
'/path/to/shell' and the comparison to valid shells list failed.

Fixes: ComplianceAsCode#13657
@openshift-ci openshift-ci Bot added the needs-ok-to-test Used by openshift-ci bot. label Jun 1, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jun 1, 2026

Hi @guyy-claroty. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Copy Markdown
Collaborator

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have run the TSs locally on a RHEL 9 VM and they passed

@jan-cerny jan-cerny added this to the 0.1.82 milestone Jun 2, 2026
@jan-cerny jan-cerny added the OVAL OVAL update. Related to the systems assessments. label Jun 2, 2026
@jan-cerny jan-cerny merged commit 8343fa6 into ComplianceAsCode:master Jun 2, 2026
54 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Used by openshift-ci bot. OVAL OVAL update. Related to the systems assessments.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rule no_invalid_shell_accounts_unlocked is failing due to regular user

2 participants