07/07/2022, 12:42 AM
Hello everyone, Quick Question: What would cause the user creation to fail? I sometimes see this error:[WARNING]: Failed to create user johndoe
here's a little snippet:
[    9.302014] cloud-init[620]: 2022-07-06 22:56:06,308 -[WARNING]: DEPRECATION: key 'ca-certs' is now deprecated. Use 'ca_certs' instead.
[    9.310466] cloud-init[620]: Updating certificates in /etc/ssl/certs...
[    9.957213] cloud-init[620]: 0 added, 0 removed; done.
[    9.959290] cloud-init[620]: Running hooks in /etc/ca-certificates/update.d...
[    9.961933] cloud-init[620]: done.
[    9.983448] cloud-init[620]: 2022-07-06 22:56:06,989 -[WARNING]: Failed to create user johndoe
[    9.986888] cloud-init[620]: 2022-07-06 22:56:06,991 -[WARNING]: Running module users-groups (<module 'cloudinit.config.cc_users_groups' from '/usr/lib/python3/dist-packages/cloudinit/config/'>) failed
[   10.520038] cloud-init[620]: Generating public/private rsa key pair.
[   10.522103] cloud-init[620]: Your identification has been saved in /etc/ssh/ssh_host_rsa_key
[   10.524759] cloud-init[620]: Your public key has been saved in /etc/ssh/
[   10.527118] cloud-init[620]: The key fingerprint is:
Which is causing this other error towards the end:
sudo -iu johndoe XDG_RUNTIME_DIR=/run/user/501 systemctl --user enable --now dbus
sudo: unknown user johndoe
sudo: error initializing audit plugin sudoers_audit
a bit more snippet:
[   33.254669] sudo[2228]: + '[' -e /run/user/501/systemd/private ']'
[   33.255221] sudo[2228]: + '[' -n '' ']'
[   33.255977] sudo[2228]: + sudo -iu johndoe XDG_RUNTIME_DIR=/run/user/501 systemctl --user enable --now dbus
[   33.257239] sudo[2228]: sudo: unknown user johndoe
[   33.259272] sudo[2228]: sudo: error initializing audit plugin sudoers_audit
[   33.259392] sudo[2228]: LIMA| WARNING: Failed to execute /mnt/lima-cidata/boot/
But if I create a new user, say
on my macOS, run
sudo su - janedoe
, copy over the .lima folder from
user to
and run
limactl start vm-name
, it starts fine with no issues... Any ideas what the issue could be or where I can look?


07/07/2022, 2:16 AM
Does your actual user name contains a non-alphanum character?
Or extremely long?


07/07/2022, 7:00 AM
We would replace the actual user name with just
if the macOS username contained any special characters:
I wonder if the user name or the uid is already in use inside the image; but if you can't share the actual name/id, then you will have to check this yourself by creating a shell inside the VM from your
account and looking at


07/07/2022, 1:23 PM
Thank You guys!!! @fast-garage-66093, yeah, it looks like the uid was already taken... Thanks again for all your help...