mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-27 15:33:06 +00:00
added uid discovery and usage
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
375847536b
commit
113d422dd4
5 changed files with 49 additions and 22 deletions
|
|
@ -190,3 +190,26 @@
|
|||
tags:
|
||||
- rule_1.2.2
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: "PRELIM | AUDIT | Discover Interactive UID MIN and MIN from logins.def"
|
||||
block:
|
||||
- name: "PRELIM | AUDIT | Capture UID_MIN information from logins.def"
|
||||
shell: grep -w "^UID_MIN" /etc/login.defs | awk '{print $NF}'
|
||||
register: uid_min_id
|
||||
|
||||
- name: "PRELIM | AUDIT | Capture UID_MAX information from logins.def"
|
||||
shell: grep -w "^UID_MAX" /etc/login.defs | awk '{print $NF}'
|
||||
register: uid_max_id
|
||||
|
||||
- name: "PRELIM | AUDIT | Capture GID_MIN information from logins.def"
|
||||
shell: grep -w "^GID_MIN" /etc/login.defs | awk '{print $NF}'
|
||||
register: gid_min_id
|
||||
|
||||
- name: "PRELIM | AUDIT | set_facts for interactive uid/gid"
|
||||
set_fact:
|
||||
min_int_uid: uid_min_id.stdout
|
||||
max_int_uid: uid_max_id.stdout
|
||||
|
||||
when:
|
||||
- not discover_int_uid
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue