From afcc220929388b1bbfd18da86b89d8e13c754b78 Mon Sep 17 00:00:00 2001 From: Ditmar Visser Date: Thu, 5 Jun 2025 20:24:29 +0000 Subject: [PATCH] fix: users on vm's --- terraform/cloudinit-azure.yaml | 8 ++++++-- terraform/userdata.tftpl | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/terraform/cloudinit-azure.yaml b/terraform/cloudinit-azure.yaml index 48accb1..f79cbef 100644 --- a/terraform/cloudinit-azure.yaml +++ b/terraform/cloudinit-azure.yaml @@ -3,6 +3,10 @@ local-hostname: ${hostname} users: - name: testuser - ssh-authorized-keys: - - ${azure_ssh_public_key} + groups: sudo shell: /bin/bash + sudo: ["ALL=(ALL) NOPASSWD:ALL"] + ssh_authorized_keys: + - ${azure_ssh_public_key} + lock_passwd: true + passwd: "" diff --git a/terraform/userdata.tftpl b/terraform/userdata.tftpl index d2800d9..68d8ce8 100644 --- a/terraform/userdata.tftpl +++ b/terraform/userdata.tftpl @@ -18,7 +18,7 @@ write_files: content: | Host azurevm HostName ${azure-vm-ip} - User iac + User testuser IdentityFile ~/.ssh/azure StrictHostKeyChecking no UserKnownHostsFile=/dev/null