Skip to content

Commit

Permalink
Merge pull request #87 from siemens/siemens/feat/prelim_interactive_u…
Browse files Browse the repository at this point in the history
…sers_not_detected_correctly

Optimization of `interactive-users` detection(issue #86)
  • Loading branch information
uk-bolly authored Sep 22, 2023
2 parents 74e87ca + a4c63ca commit 24cd6a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tasks/prelim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@
- always

- name: "PRELIM | Interactive User accounts"
ansible.builtin.shell: 'cat /etc/passwd | grep -Ev "nologin|/sbin|/bin" | cut -d: -f6'
ansible.builtin.shell: >
grep -E -v '^(root|halt|sync|shutdown)' /etc/passwd | awk -F: '($7 != "'"$(which nologin)"'" && $7 != "/bin/false") { print $6 }'
changed_when: false
register: interactive_users_home
tags:
Expand Down

0 comments on commit 24cd6a3

Please sign in to comment.