Fix edge case script-user-reset-password
This commit is contained in:
@@ -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"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user