I'm trying to set up Amazon Linux 2023 on-premises and I'm having trouble getting the cloud-init password settings to be recognized. I've experimented with various configurations but none seem to work. My latest attempt is as follows:
#cloud-config
#vim:syntax=yaml
users:
- default
- name: ec2-user
plain_text_passwd: 'ubuntu'
lock_passwd: false
sudo: ALL=(ALL) NOPASSWD:ALL
Any guidance on how to fix this would be appreciated!
5 Answers
Honestly, I've had a frustrating time with cloud-init myself. It can be really tricky to work with at times!
You might want to check how you're running Amazon Linux on-premises and how you connect to it. In Amazon Linux 2023, SSH password authentication is usually disabled by default, which could cause issues here.
Be sure to look at the cloud-init logs. They can give you insights into what's going wrong with your configuration.
You may need to mount the disk image and check the logs there. I've used Amazon Linux 2 in isolated environments without running into this issue, so your configuration might need some tweaking.
I've put together some notes about running Amazon Linux at home using KVM. It might prove useful for your setup! You can take a look at them here: https://www.reddit.com/r/amazonlinux/s/yL8oK8Si9p.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures