From b68bf72fbd0895221ded1dc0c4eb102398bda048 Mon Sep 17 00:00:00 2001 From: layluke Date: Wed, 1 May 2024 22:45:10 -0400 Subject: [PATCH] Excluding non-interactive login shells from being parsed from /etc/passwd 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