mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-27 07:23:07 +00:00
fixed UID logic
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
1345ca0437
commit
a57c499638
2 changed files with 7 additions and 4 deletions
|
|
@ -13,7 +13,7 @@
|
|||
- item.id != "sync"
|
||||
- item.id != "shutdown"
|
||||
- item.id != "halt"
|
||||
- item.gid < min_int_uid
|
||||
- item.uid < 1000
|
||||
- item.shell != " /bin/false"
|
||||
- item.shell != " /usr/sbin/nologin"
|
||||
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
- item.id != "shutdown"
|
||||
- item.id != "sync"
|
||||
- item.id != "root"
|
||||
- item.gid < min_int_uid
|
||||
- item.uid < 1000
|
||||
- item.shell != " /bin/false"
|
||||
- item.shell != " /usr/sbin/nologin"
|
||||
when:
|
||||
|
|
|
|||
|
|
@ -134,9 +134,12 @@
|
|||
- name: "6.2.7 | L1 | AUDIT | Ensure users' home directories permissions are 750 or more restrictive"
|
||||
stat:
|
||||
path: "{{ item }}"
|
||||
with_items: "{{ rhel9cis_passwd | selectattr('uid', '>=', min_int_uid) | selectattr('uid', '!=', max_int_uid) | map(attribute='dir') | list }}"
|
||||
with_items: "{{ rhel9cis_passwd | selectattr('uid', '>=', min_int_uid | int) | selectattr('uid', '<', max_int_uid | int) | selectattr('dir', '!=', '/') | map(attribute='dir') | list }}"
|
||||
register: rhel_09_6_2_7_audit
|
||||
|
||||
- debug:
|
||||
var: rhel_09_6_2_7_audit
|
||||
|
||||
- name: "6.2.7 | L1 | AUDIT | Ensure users' home directories permissions are 750 or more restrictive"
|
||||
shell: find -H {{ item.0 | quote }} -not -type l -perm /027
|
||||
args:
|
||||
|
|
@ -500,7 +503,7 @@
|
|||
stat:
|
||||
path: "{{ item }}"
|
||||
register: rhel_09_6_2_20_audit
|
||||
with_items: "{{ rhel9cis_passwd | selectattr('uid', '>=', min_int_uid) | selectattr('uid', '!=', max_int_uid) | map(attribute='dir') | list }}"
|
||||
with_items: "{{ rhel9cis_passwd | selectattr('uid', '>=', min_int_uid | int) | selectattr('uid', '<', max_int_uid | int) | selectattr('dir', '!=', '/') | map(attribute='dir') | list }}"
|
||||
|
||||
- name: "6.2.20 | L1 | AUDIT | Ensure all users' home directories exist"
|
||||
shell: find -H {{ item.0 | quote }} -not -type l -perm /027
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue