mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-25 06:33:06 +00:00
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"
|
- 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 }}"
|
ansible.builtin.shell: chage --inactive {{ rhel9cis_inactivelock.lock_days }} "{{ item }}"
|
||||||
loop: "{{ rhel9cis_5_6_1_4_user_list.stdout_lines }}"
|
loop: "{{ rhel9cis_5_6_1_4_user_list.stdout_lines }}"
|
||||||
|
when: item in discovered_interactive_usernames.stdout
|
||||||
when:
|
when:
|
||||||
- rhel9cis_rule_5_6_1_4
|
- rhel9cis_rule_5_6_1_4
|
||||||
tags:
|
tags:
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,10 @@
|
||||||
- item.id != "halt"
|
- item.id != "halt"
|
||||||
- item.id != "nfsnobody"
|
- item.id != "nfsnobody"
|
||||||
- item.uid < min_int_uid | int
|
- item.uid < min_int_uid | int
|
||||||
- item.shell != " /bin/false"
|
- item.shell != "/bin/false"
|
||||||
- item.shell != " /usr/sbin/nologin"
|
- item.shell != "/usr/sbin/nologin"
|
||||||
|
- item.shell != "/sbin/nologin"
|
||||||
|
- item.shell != "/dev/null"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.id }}"
|
label: "{{ item.id }}"
|
||||||
|
|
||||||
|
|
@ -31,8 +33,10 @@
|
||||||
- item.id != "root"
|
- item.id != "root"
|
||||||
- item.id != "nfsnobody"
|
- item.id != "nfsnobody"
|
||||||
- item.uid < min_int_uid | int
|
- item.uid < min_int_uid | int
|
||||||
- item.shell != " /bin/false"
|
- item.shell != "/bin/false"
|
||||||
- item.shell != " /usr/sbin/nologin"
|
- item.shell != "/usr/sbin/nologin"
|
||||||
|
- item.shell != "/sbin/nologin"
|
||||||
|
- item.shell != "/dev/null"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.id }}"
|
label: "{{ item.id }}"
|
||||||
when:
|
when:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue