5.5.3 fix and update

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
Mark Bolwell 2023-07-26 11:42:21 +01:00
parent 7c34f61d11
commit a791c81cf2
No known key found for this signature in database
GPG key ID: 1DE02A772D0908F9
2 changed files with 6 additions and 13 deletions

View file

@ -4,6 +4,7 @@
- [#72](https://github.com/ansible-lockdown/RHEL9-CIS/issues/72) - [#72](https://github.com/ansible-lockdown/RHEL9-CIS/issues/72)
- Only run check when paybook user not a superuser - Only run check when paybook user not a superuser
- fix for 5.5.3 thanks to @nrg-fv
## 1.0.9 ## 1.0.9

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: