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

Multiple checks fail if files are absent #63

Open
PrymalInstynct opened this issue Nov 12, 2024 · 0 comments
Open

Multiple checks fail if files are absent #63

PrymalInstynct opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@PrymalInstynct
Copy link
Contributor

PrymalInstynct commented Nov 12, 2024

Describe the Issue
Multiple tasks are failing because in a clean RHEL 9.4 and Rocky 9.4 install files like /etc/group- are not present.

This file is only created if /etc/group is modified and acts as a backup of the previous version of the file.

Affected Files
/etc/passwd-
/etc/group-
/etc/shadow-
/etc/gshadow-

Expected Behavior
Complete the tasks even if the files are not present

Actual Behavior
Tasks failed because the files were not present

Control(s) Affected
RHEL-09-232060
RHEL-09-232070
RHEL-09-232080
RHEL-09-232085
RHEL-09-232100
RHEL-09-232105
RHEL-09-232120
RHEL-09-232125
RHEL-09-232140
RHEL-09-232145
RHEL-09-232160
RHEL-09-232165

Environment (please complete the following information):

  • branch being used: Nov24_issues
  • Ansible Version: 2.17.5
  • Host Python Version: 3.9.18
  • Ansible Server Python Version: 3.12.7
  • Additional Details:

Example Ansible Output

TASK [RHEL9-STIG : MEDIUM | RHEL-09-232060 | PATCH | RHEL 9 /etc/group- file must have mode 0644 or less permissive to prevent unauthorized access.] **********
Tuesday 12 November 2024  06:43:09 -0700 (0:00:00.933)       0:13:33.534 ****** 
fatal: [10.10.1.217]: FAILED! => {"changed": false, "msg": "file (/etc/group-) is absent, cannot continue", "path": "/etc/group-", "state": "absent"}

Possible Solution
Create an AUDIT task to verify if the file is present before trying to change the permissions

@PrymalInstynct PrymalInstynct added the bug Something isn't working label Nov 12, 2024
@PrymalInstynct PrymalInstynct changed the title RHEL-09-232060 failed if file is absent RHEL-09-232060 & RHEL-09-232070 failed if file is absent Nov 12, 2024
@PrymalInstynct PrymalInstynct changed the title RHEL-09-232060 & RHEL-09-232070 failed if file is absent Multiple checks failed if file is absent Nov 12, 2024
@PrymalInstynct PrymalInstynct changed the title Multiple checks failed if file is absent Multiple checks faile if files are absent Nov 12, 2024
@PrymalInstynct PrymalInstynct changed the title Multiple checks faile if files are absent Multiple checks fail if files are absent Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant