Update create-user.sh

This commit is contained in:
2025-07-03 18:29:31 +00:00
parent 99c9d6bce5
commit 42c0c2bb21

View File

@@ -3,19 +3,19 @@
echo "== Flexible User Creation Script =="
echo
read -p "Username to create (required): " USERNAME
read -p "Username to create (required): " USERNAME </dev/tty
if [[ -z "$USERNAME" ]]; then
echo "Error: Username is required."
exit 1
fi
read -p "Paste the SSH public key: " PUBKEY
read -p "Paste the SSH public key: " PUBKEY </dev/tty
if [[ -z "$PUBKEY" ]]; then
echo "Error: Public key is required."
exit 1
fi
read -p "Comma-separated groups to add (e.g. sudo,docker): " GROUPS
read -p "Comma-separated groups to add (e.g. sudo,docker): " GROUPS </dev/tty
# DEBUG LINE
echo "[DEBUG] Raw GROUPS value: '$GROUPS'"