If you need simple command to list all interactive users this awk one-liner might be helpful. It prints all usernames without few keywords in shell. May trigger false positives, so be careful.
awk -F: '$NF !~ /(false|nologin|halt|shutdown|sync)/ {print $1}' /etc/passwd
No comments:
Post a Comment