forked from ansible-lockdown/RHEL9-CIS
improved tests based upon #190 thanks to @ipruteanu-sie
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
b279a9fb80
commit
bd7c4e3da2
2 changed files with 9 additions and 4 deletions
|
|
@ -116,6 +116,7 @@
|
|||
- name: "5.6.1.4 | PATCH | Ensure inactive password lock is 30 days or less | Apply Inactive setting to existing accounts"
|
||||
ansible.builtin.shell: chage --inactive {{ rhel9cis_inactivelock.lock_days }} "{{ item }}"
|
||||
loop: "{{ rhel9cis_5_6_1_4_user_list.stdout_lines }}"
|
||||
when: item in discovered_interactive_usernames.stdout
|
||||
when:
|
||||
- rhel9cis_rule_5_6_1_4
|
||||
tags:
|
||||
|
|
|
|||
|
|
@ -14,8 +14,10 @@
|
|||
- item.id != "halt"
|
||||
- item.id != "nfsnobody"
|
||||
- item.uid < min_int_uid | int
|
||||
- item.shell != " /bin/false"
|
||||
- item.shell != " /usr/sbin/nologin"
|
||||
- item.shell != "/bin/false"
|
||||
- item.shell != "/usr/sbin/nologin"
|
||||
- item.shell != "/sbin/nologin"
|
||||
- item.shell != "/dev/null"
|
||||
loop_control:
|
||||
label: "{{ item.id }}"
|
||||
|
||||
|
|
@ -31,8 +33,10 @@
|
|||
- item.id != "root"
|
||||
- item.id != "nfsnobody"
|
||||
- item.uid < min_int_uid | int
|
||||
- item.shell != " /bin/false"
|
||||
- item.shell != " /usr/sbin/nologin"
|
||||
- item.shell != "/bin/false"
|
||||
- item.shell != "/usr/sbin/nologin"
|
||||
- item.shell != "/sbin/nologin"
|
||||
- item.shell != "/dev/null"
|
||||
loop_control:
|
||||
label: "{{ item.id }}"
|
||||
when:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue