diff --git a/bin/create_user.sh b/bin/create_user.sh index d4456e1..47a84b4 100755 --- a/bin/create_user.sh +++ b/bin/create_user.sh @@ -88,7 +88,7 @@ if [ ! -d "${HOME_FOLDER}" ]; then error=1; fi; # allow 10 to 39 length for password -if ! [[ "${PASSWORD_LENGTH}" =~ ^[13][0-9]$ ]]; then +if [ ! -z "${PASSWORD_LENGTH}" ] && ! [[ "${PASSWORD_LENGTH}" =~ ^[13][0-9]$ ]]; then echo "Password length set error, can only be a value between 10 and 39"; error=1; elif [ -z ${PASSWORD_LENGTH} ]; then