Added pam_auth_password to nullok check
Change-Id: I692241ce21e8bd8912b8d1ff5a261ae10d7da1f2
This commit is contained in:
parent
e4b55822cf
commit
9b3ea39df4
@ -48,15 +48,13 @@
|
|||||||
|
|
||||||
- name: Prevent users with blank or null passwords from authenticating (Red Hat)
|
- name: Prevent users with blank or null passwords from authenticating (Red Hat)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: "{{ pam_auth_file }}"
|
dest: "{{ item[1] }}"
|
||||||
state: present
|
state: present
|
||||||
regexp: "^({{ item }}.*sufficient.*)nullok(.*)$"
|
regexp: "^({{ item[0] }}.*sufficient.*)nullok(.*)$"
|
||||||
line: '\1\2'
|
line: '\1\2'
|
||||||
backup: yes
|
backup: yes
|
||||||
backrefs: yes
|
backrefs: yes
|
||||||
with_items:
|
loop: "{{ ['auth', 'password'] |product(['{{ pam_auth_file }}', '{{ pam_password_file }}'])|list }}"
|
||||||
- auth
|
|
||||||
- password
|
|
||||||
when:
|
when:
|
||||||
- ansible_facts['os_family'] == 'RedHat'
|
- ansible_facts['os_family'] == 'RedHat'
|
||||||
- security_disallow_blank_password_login | bool
|
- security_disallow_blank_password_login | bool
|
||||||
|
Loading…
Reference in New Issue
Block a user