From 5ae8fb242c463f57cf8fe724c82a9f5299462f5c Mon Sep 17 00:00:00 2001 From: Pouzor Date: Mon, 9 Mar 2026 23:45:06 +0100 Subject: [PATCH] feat: generate random root password for LXC container and display it at end of install --- scripts/install-proxmox.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/install-proxmox.sh b/scripts/install-proxmox.sh index 8029bc1..3cec225 100755 --- a/scripts/install-proxmox.sh +++ b/scripts/install-proxmox.sh @@ -41,6 +41,7 @@ RAM="${RAM:-1024}" # MB CORES="${CORES:-2}" BRIDGE="${BRIDGE:-vmbr0}" RAW="https://raw.githubusercontent.com/Pouzor/homelable/main" +ROOT_PASSWORD="${ROOT_PASSWORD:-$(tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 16)}" step "Creating Homelable LXC (CTID=$CTID, hostname=$CT_HOSTNAME, storage=$STORAGE)" @@ -70,6 +71,7 @@ pct create "$CTID" "$TEMPLATE" \ --ostype debian \ --unprivileged 1 \ --features "nesting=1" \ + --password "$ROOT_PASSWORD" \ --start 1 info "Container $CTID created and started" @@ -98,6 +100,9 @@ IP=$(pct exec "$CTID" -- hostname -I 2>/dev/null | awk '{print $1}' || echo "