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 4d280b6 commit b6cdddeCopy full SHA for b6cddde
scripts/find_bash_users.sh
@@ -0,0 +1,7 @@
1
+#!/bin/bash
2
+set -euo pipefail
3
+if command -v getent >/dev/null 2>&1; then
4
+ getent passwd | awk -F: '$7 ~ /\/bin\/bash$/ {printf "%-20s %s\n", $1, $7}'
5
+else
6
+ awk -F: '$7 ~ /\/bin\/bash$/ {printf "%-20s %s\n", $1, $7}' /etc/passwd
7
+fi
0 commit comments