From 2db15ef565a8155a95bdac5eee2ec0fcba5d8517 Mon Sep 17 00:00:00 2001 From: layluke Date: Thu, 2 May 2024 00:17:47 -0400 Subject: [PATCH] Excluding non-interactive logins shells from being parsed Signed-off-by: layluke --- tasks/parse_etc_passwd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/parse_etc_passwd.yml b/tasks/parse_etc_passwd.yml index 4df03de1..0285c947 100644 --- a/tasks/parse_etc_passwd.yml +++ b/tasks/parse_etc_passwd.yml @@ -2,7 +2,7 @@ - name: "PRELIM | {{ rhel7stig_passwd_tasks }} | Parse /etc/passwd" block: - name: "PRELIM | {{ rhel7stig_passwd_tasks }} | Parse /etc/passwd" - ansible.builtin.shell: cat /etc/passwd + ansible.builtin.shell: cat /etc/passwd | grep -v '/sbin/nologin\|/usr/sbin/nologin' changed_when: false check_mode: false register: rhel7stig_passwd_file_audit