Fix edge case script-user-reset-password
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
# This script will reset a user password on the server
|
||||
# Copyright 2021 Bryan C. Roessler
|
||||
|
||||
declare user=""
|
||||
|
||||
parent="${BASH_SOURCE[0]}"
|
||||
parent=${parent%/*}
|
||||
|
||||
@@ -17,7 +19,7 @@ is_root
|
||||
|
||||
[[ $# -gt 2 ]] && "Too many arguments" && exit 1
|
||||
|
||||
if ! id -u "$user"; then
|
||||
if ! id -u "$user" ; then
|
||||
echo "User $user does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user