Update create-user.sh
This commit is contained in:
@@ -3,19 +3,19 @@
|
|||||||
echo "== Flexible User Creation Script =="
|
echo "== Flexible User Creation Script =="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
read -p "Username to create (required): " USERNAME
|
read -p "Username to create (required): " USERNAME </dev/tty
|
||||||
if [[ -z "$USERNAME" ]]; then
|
if [[ -z "$USERNAME" ]]; then
|
||||||
echo "Error: Username is required."
|
echo "Error: Username is required."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -p "Paste the SSH public key: " PUBKEY
|
read -p "Paste the SSH public key: " PUBKEY </dev/tty
|
||||||
if [[ -z "$PUBKEY" ]]; then
|
if [[ -z "$PUBKEY" ]]; then
|
||||||
echo "Error: Public key is required."
|
echo "Error: Public key is required."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
# DEBUG LINE
|
||||||
echo "[DEBUG] Raw GROUPS value: '$GROUPS'"
|
echo "[DEBUG] Raw GROUPS value: '$GROUPS'"
|
||||||
|
|||||||
Reference in New Issue
Block a user