From 02f60f176d8c140d2fe357e107eed902b09cb5c9 Mon Sep 17 00:00:00 2001 From: Christophe JEANNEROT Date: Sat, 21 Feb 2026 15:46:25 +0100 Subject: [PATCH] Actualiser debian12-fr.sh --- debian12-fr.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/debian12-fr.sh b/debian12-fr.sh index cda0a9a..f45e702 100644 --- a/debian12-fr.sh +++ b/debian12-fr.sh @@ -572,6 +572,12 @@ packages: locale: ${LOCALE} +disable_root: false +ssh_pwauth: false +chpasswd: + expire: false + list: [] + write_files: - path: /etc/default/keyboard content: | @@ -607,6 +613,10 @@ runcmd: # systemd-localed (optional) - command -v localectl >/dev/null 2>&1 && localectl set-locale LANG=${LOCALE} || true - command -v localectl >/dev/null 2>&1 && localectl set-keymap ${CONSOLE_KEYMAP} || true + + - sed -i 's/^#\?PasswordAuthentication .*/PasswordAuthentication no/' /etc/ssh/sshd_config + - sed -i 's/^#\?PermitRootLogin .*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config + - systemctl restart ssh || true EOF qm set $VMID --cicustom "user=local:snippets/${VMID}-user-data.yaml" >/dev/null @@ -659,6 +669,8 @@ else qm resize $VMID scsi0 ${DEFAULT_DISK_SIZE} >/dev/null fi +qm set "$VMID" --ciuser root + msg_ok "Created a Debian 12 VM ${CL}${BL}(${HN})" # Requested: VM should not start automatically => START_VM defaults to "no"