Skip to content

Commit ed1bcb0

Browse files
committed
fix: modernize cloud-init user password configuration
Replace deprecated chpasswd.list with plain_text_passwd in user configuration. The chpasswd.list method is deprecated in newer cloud-init versions and plain_text_passwd is the recommended approach for setting user passwords. This change: - Removes the deprecated chpasswd section - Adds plain_text_passwd field to the user configuration - Maintains the same password (torrust123) for compatibility - Eliminates deprecation warnings in cloud-init logs
1 parent e4833aa commit ed1bcb0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

infrastructure/cloud-init/user-data.yaml.tpl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,10 @@ users:
2727
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
2828
shell: /bin/bash
2929
lock_passwd: false
30+
plain_text_passwd: torrust123
3031
ssh_authorized_keys:
3132
- ${ssh_public_key}
3233

33-
# Set password using chpasswd (most reliable method)
34-
chpasswd:
35-
list: |
36-
torrust:torrust123
37-
expire: false
38-
3934
# Enable SSH password authentication for debugging
4035
ssh_pwauth: true
4136

0 commit comments

Comments
 (0)