I believe that cloud-init is working as intended here. I'm unfamiliar with the Ubuntu Image tool, but it looks like there is overlap between the user-creation from that tool and cloud-init.
When cloud-init runs, it will by default create a distro-default user with no password and password login disabled. On Ubuntu, this user is 'ubuntu'. This behavior can be overridden using user data alongside the network-config. The user data file is described here: https://cloudinit.readthedocs.io/en/latest/reference/datasources/nocloud.html#file-formats Whereas the user data for creating users is described here: https://cloudinit.readthedocs.io/en/latest/reference/modules.html#users-and-groups It describes how the default user can be overridden. Based on this, I think I can explain your 3 scenarios: 1. Cloud-init created user ubuntu with no password which somehow superseded the Ubuntu image user creation. 2. 1 happened, but since you also specified another user, that user got created and so works as expected. 3. With no NoCloud seed data, cloud-init didn't run and didn't attempt to create any default user. Does that help? ** Changed in: cloud-init (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2054785 Title: cloud-init destroys the password of existing 'ubuntu' account To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2054785/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
