4
0
Fork 0

Merge pull request #74 from ansible-lockdown/July23_fixes

July23 fixes
This commit is contained in:
uk-bolly 2023-07-26 14:32:40 +01:00 committed by GitHub
commit bcf7399d02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 13 deletions

View file

@ -1,6 +1,13 @@
# Changes to rhel9CIS # Changes to rhel9CIS
## 1.0.10
- [#72](https://github.com/ansible-lockdown/RHEL9-CIS/issues/72)
- Only run check when paybook user not a superuser
- fix for 5.5.3 thanks to @nrg-fv
## 1.0.9 ## 1.0.9
fixed assert for user password set fixed assert for user password set
thanks to @byjunks thanks to @byjunks

View file

@ -38,6 +38,7 @@
sudo_password_rule: rhel9cis_rule_5_3_4 sudo_password_rule: rhel9cis_rule_5_3_4
when: when:
- rhel9cis_rule_5_3_4 - rhel9cis_rule_5_3_4
- ansible_env.SUDO_USER is defined
- not system_is_ec2 - not system_is_ec2
tags: tags:
- user_passwd - user_passwd

View file

@ -77,19 +77,11 @@
- patch - patch
- rule_5.5.2 - rule_5.5.2
- name: "5.5.3 | PATCH | Ensure password reuse is limited" - name: "5.5.3 | PATCH | Ensure password reuse is limited | pwquality"
block: ansible.builtin.lineinfile:
- name: "5.5.3 | PATCH | Ensure password reuse is limited | pwquality" path: /etc/pam.d/system-auth
ansible.builtin.lineinfile: line: "password requisite pam_pwhistory.so try_first_pass enforce_for_root retry=3 remember={{ rhel9cis_pam_faillock.remember }}"
path: /etc/pam.d/system-auth insertafter: '^password\s*requisite\s*pam_pwquality.so'
line: "password requisite pam_pwhistory.so try_first_pass enforce_for_root retry=3 remember={{ rhel9cis_pam_faillock.remember }}"
insertafter: '^password\s*requisite\s*pam_pwquality.so'
- name: "5.5.3 | PATCH | Ensure password reuse is limited | pam_unix"
ansible.builtin.replace:
path: /etc/pam.d/system-auth
regexp: '^password\s*sufficient\s*pam_unix.so.*$'
replace: 'password sufficient pam_unix.so sha512 shadow try_first_pass use_authtok remember={{ rhel9cis_pam_faillock.remember }}'
when: when:
- rhel9cis_rule_5_5_3 - rhel9cis_rule_5_5_3
tags: tags: