Ubuntu Cloud Image 20.04 change password failed

anything in the logs of the vm?
 
Anyone figure this out?

Currently trying to create a template with ubuntu cloud image and cloud-init but getting the password error. Also, setting SSH keys doesn't work/ Networking settings do though.
 

Attachments

  • Screenshot_20220511_223336.png
    Screenshot_20220511_223336.png
    82.6 KB · Views: 6
I faced the same problem on Ubuntu Cloud Image 22.04, and after trial and error, I figured this out. Just don't use the word "admin" as a username, use something else.

Code:
cloud-init[467]: 2023-01-17 16:12:09,094 - ug_util.py[WARNING]: DEPRECATED: 'user' of type string is deprecated and will be removed in a future release. Use 'users' list instead.
cloud-init[467]: 2023-01-17 16:12:09,103 - util.py[WARNING]: Failed to set hashed passwords with chpasswd for ['admin']
cloud-init[467]: 2023-01-17 16:12:09,117 - util.py[WARNING]: Running module set-passwords (<module 'cloudinit.config.cc_set_passwords' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_set_passwords.py'>) failed
 
I faced the same issue. And as @slowpork said, Admin shouldn't be used. The boot logs are below, and the related line is:
Code:
[   15.748817] cloud-init[547]: 2023-05-21 16:23:05,299 - util.py[WARNING]: Failed to create user admin

It seems proxmox is conflicting with some default user/value in the distro.
 

Attachments

  • ubuntu22-failed-init-logs.txt
    64.9 KB · Views: 1
I can see admin:x:118: in /etc/group, but I'm not sure if this is the root cause of the issue.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!