We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5910c27 commit 782cc2fCopy full SHA for 782cc2f
src/find_bash_users.sh
@@ -0,0 +1,8 @@
1
+PASSWD_FILE="${1:-/etc/passwd}"
2
+
3
+if [[ ! -r "$PASSWD_FILE" ]]; then
4
+ echo "Error: Cannot read file '$PASSWD_FILE'" >&2
5
+ exit 1
6
+fi
7
8
+awk -F: '$7 == "/bin/bash" { print $1 }' "$PASSWD_FILE"
0 commit comments