Files
proxmox/scripts/archive/small-scripts/set-password-via-proxmox-api.sh
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

50 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# Attempt to set container password via Proxmox API/config
# This script tries multiple methods to set the password
set -euo pipefail
# Load IP configuration
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
VMID=5000
PASSWORD="L@kers2010"
PROXMOX_HOST="${PROXMOX_HOST_ML110}"
echo "Attempting to set password for container $VMID..."
echo ""
# Method 1: Try via container config (if supported)
echo "Method 1: Attempting via container config..."
# Note: Proxmox doesn't support password in config, but we can document it
# Method 2: Create a script and execute it in container
echo "Method 2: Creating password script in container..."
# Get container node
CONTAINER_NODE=$(ssh -o StrictHostKeyChecking=no root@"$PROXMOX_HOST" \
"for node in ml110 pve pve2; do \
if pvesh get /nodes/\$node/lxc/$VMID/status/current 2>/dev/null | grep -q status; then \
echo \$node; break; \
fi; \
done" 2>/dev/null || echo "")
if [ -n "$CONTAINER_NODE" ]; then
echo "Container found on node: $CONTAINER_NODE"
echo ""
echo "Password must be set manually via Proxmox Web UI:"
echo " 1. Navigate to Container $VMID → Options → Password"
echo " 2. Enter password: $PASSWORD"
echo " 3. Click OK"
echo ""
echo "Or via container console:"
echo " ssh $PROXMOX_HOST"
echo " pct enter $VMID"
echo " passwd root"
echo " # Enter: $PASSWORD (twice)"
fi