fix: alphanumeric password only (no special chars), safe for .env and systemd

This commit is contained in:
Claus Lohmar 2026-07-07 17:11:58 +01:00
parent 585d4e6ec8
commit 47d66f476d

View file

@ -34,8 +34,8 @@ while [ -z "$ADMIN_USERNAME" ]; do
read -p "Admin username (required): " ADMIN_USERNAME read -p "Admin username (required): " ADMIN_USERNAME
done done
# Generate strong random password # Generate random alphanumeric password (16 chars, easy to type)
ADMIN_PASSWORD=$(tr -dc 'A-Za-z0-9!@#$%^&*()_+-=' < /dev/urandom | head -c 20 2>/dev/null || echo "NextWks$(date +%s)") ADMIN_PASSWORD=$(tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 16 2>/dev/null || echo "nextwks$(date +%s)")
echo "" echo ""
echo "========================================" echo "========================================"