-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faulty installation of Ubuntu (Waiting for the essential requirement 1 of 5: "ssh"): util.py[WARNING]: Failed to create user admin
#2037
Comments
util.py[WARNING]: Failed to create user admin
Is this issue specific to your username "admin"? |
I don't have a clue. If that is, it's really weird 😐️️️️️️ |
Do you see other errors around the |
Just a deprecation notification a few lines before:
|
Yes, I think the problem is that cloud-init by default creates both a user and a group with the same name, and the This behaviour can be disabled with the users:
- name: admin
no_user_group: true
... I'm not sure why we need to create the user group in Lima; maybe we should disable this for all users. What do you think @AkihiroSuda? I just wonder if this will break existing use-cases, and we would have to make it configurable, which I would like to avoid. I would rather say: "Any instance created by Lima 1.0 or later will not create an additional group for the user". Otherwise I expect any user names that match existing group names can't be used. We do have logic to use |
Hmm, we also have #1015 to allow the user to specify a different username for the VM. Maybe that is the best way to deal with this because even when we avoid creating the group name, we would still have the potential clash with existing user names in the Linux distro ( |
I'm not familiar with Lima, so the question is: what is the reason of falling back to |
Lima provides the illusion of seamlessly blending the host and the guest environment. You can mount volumes from the host and use them inside the guest. It makes it look like So I think providing a mechanism for users to override the username should help to deal with the conflicting names that we can't detect automatically (but maybe we should have a hard-coded list of "known" legacy Unix usernames that are almost always unavailable). Note that you wouldn't have to specify the alternate username all the time; you could create a |
@jandubois, could you provide with the snippets of |
I don't remember, but I assumed that corresponds to the "standard". |
Apparently "admin" is a special group only created in Ubuntu, which is why it doesn't fail Alpine or Fedora.
Trying to use "shadow" also fails: #974 |
The current CIDATA is missing entries for group, so some scripts are currently hardcoding group==user assumption.
Could probably be a good idea to also export the group, in parallel to whatever the resolution is for system names....
|
As I mentioned above, this is the default behaviour of cloud-init. If we don't want to disable this behaviour (via This would of course be guarded by the new |
I just meant that we could add another variable (or two), so that users could update (or improve) their scripts Similar to using |
I see, but not sure why that is necessary. First we have the guarantee from cloud-init that the group will be the same as the user. But you can also always use # export LIMA_CIDATA_USER=jan
# sudo -u $LIMA_CIDATA_USER id -g -n
jan
# sudo -u $LIMA_CIDATA_USER id -g
1000 But even if these values would not be readily available, we should first turn provisioning scripts into templates instead of making things available as unsupported env variables (see #2055).
My suggestion was supposed to address the issue of users with conflicting user names. We have seen at least 3 instances of people using |
Description
Steps to reproduce:
limactl create template://ubuntu --name=ubuntu
or
limactl create template://ubuntu-lts --name=ubuntu
limactl start ubuntu
Output:
Obviously, there is a problem with creating the
admin
user in cloud-initSnippet from
~/.lima/ubuntu/serial.log
:Alpine Linux works as expected
The text was updated successfully, but these errors were encountered: