logic changes

This commit is contained in:
2025-11-02 12:11:33 +01:00
parent e227d7f950
commit 6c4d769fc5

View File

@@ -86,6 +86,17 @@ done
#
if [[ -z "$adminuser" || -z "$adminpwd" ]]; then usage ; printf "\nERROR: Both -u and -p arguments are mandatory!\n\n" ; exit 1 ; fi
#
# Prevent overriding root socket authentication
#
if [[ "$adminuser" == "root" ]]; then
printf "\nERROR: The root user already exists and uses socket authentication.\n"
printf "Do not assign a password to it — this would break socket login.\n"
printf "Use a different username (e.g., admin, dbadmin, or anything else).\n\n"
exit 1
fi
#
# Username: only allow a-zA-Z0-9_.-
#