Fix edge case script-user-reset-password

This commit is contained in:
2022-01-23 12:12:55 -05:00
parent b82722f8fc
commit 6824215e67

View File

@@ -11,7 +11,11 @@ parent=${parent%/*}
is_root is_root
[[ $# -lt 1 ]] && echo "Must provide a username" && exit 1 if [[ $# -lt 1 ]]; then
echo "Current users: "
eval "getent passwd {$(awk '/^UID_MIN/ {print $2}' /etc/login.defs)..$(awk '/^UID_MAX/ {print $2}' /etc/login.defs)} | cut -d: -f1"
exit 1
fi
[[ $# -ge 1 ]] && user="$1" [[ $# -ge 1 ]] && user="$1"