forked from ansible-lockdown/RHEL9-CIS
parent
bd7c4e3da2
commit
60a9000dda
4 changed files with 159 additions and 3 deletions
|
|
@ -11,14 +11,14 @@
|
|||
- { name: minlen, value: "{{ rhel9cis_pam_password.minlen }}" }
|
||||
- { name: minclass, value: "{{ rhel9cis_pam_password.minclass }}" }
|
||||
|
||||
- name: "5.5.1 | PATCH | Ensure password creation requirements are configured | Set system-auth retry settings"
|
||||
- name: "5.5.1 | PATCH | Ensure password creation requirements are configured | Set system-auth retry settings | not Authselect"
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/pam.d/system-auth
|
||||
regexp: '^password\s*requisite\s*pam_pwquality.so'
|
||||
line: "password requisite pam_pwquality.so try_first_pass local_users_only enforce_for_root retry=3"
|
||||
insertbefore: '^#?password ?'
|
||||
|
||||
- name: "5.5.1 | PATCH | Ensure password creation requirements are configured | Set password-auth retry settings"
|
||||
- name: "5.5.1 | PATCH | Ensure password creation requirements are configured | Set password-auth retry settings | not Authselect"
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/pam.d/password-auth
|
||||
regexp: '^password\s*requisite\s*pam_pwquality.so'
|
||||
|
|
@ -42,6 +42,7 @@
|
|||
loop:
|
||||
- { regexp: '^\s*deny\s*=\s*[1-5]\b', line: 'deny = {{ rhel9cis_pam_faillock.deny }}' }
|
||||
- { regexp: '^\s*unlock_time\s*=\s*(0|9[0-9][0-9]|[1-9][0-9][0-9][0-9]+)\b', line: 'unlock_time = {{ rhel9cis_pam_faillock.unlock_time }}' }
|
||||
|
||||
- name: "5.5.2 | PATCH | Ensure lockout for failed password attempts is configured | Set preauth"
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ item }}"
|
||||
|
|
@ -51,6 +52,7 @@
|
|||
loop:
|
||||
- "/etc/pam.d/system-auth"
|
||||
- "/etc/pam.d/password-auth"
|
||||
|
||||
- name: "5.5.2 | PATCH | Ensure lockout for failed password attempts is configured | Set authfail"
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ item }}"
|
||||
|
|
@ -60,6 +62,7 @@
|
|||
loop:
|
||||
- "/etc/pam.d/system-auth"
|
||||
- "/etc/pam.d/password-auth"
|
||||
|
||||
- name: "5.5.2 | PATCH | Ensure lockout for failed password attempts is configured | Load account faillock.so"
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ item }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue