-
Notifications
You must be signed in to change notification settings - Fork 40
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
OpenStack image should not manually create user #49
Comments
ping @hartwork — this one is actually pretty severe, as it means I can't customize the cloud user (in particular, I need to force them to have a particular home directory and UID). Do you remember why you made it so that |
.. but keep the code if Vagrant support is added later.
Should be out of the way now for OpenStack. I hope that's not causing any new problems. |
Hmm, now I get errors when
|
Should I revert? Are those errors or warnings / just noise? |
Those errors result in the user not being created at all. I believe the correct thing to do is remove those groups from the |
The code that adds sudo permissions to the user went away with 326e226 above. Are we supposed to set the user up with sudo but not create it, from a cloud-init point of view? |
Judging from the Arch Linux
This is further supported by the
|
There is method |
Fixed in #50. Note that there are still some errors due to an Ubuntu-centric |
Also, 0.7.6 bites us again here, as it doesn't include the fix for https://bugs.launchpad.net/cloud-init/+bug/1396362 (whereas >= 0.7.7 does). This doesn't matter in the common case, but is of importance for VMs that need to be able to control the UID of the created user. |
The latter problem is fixed in #51. |
For the record, I also filed a bug with Arch about how they're including groups that do not exist: https://bugs.archlinux.org/task/54911 |
I've adopted the package at the aur. I'm currently preparing the 17.2 upload, I plan to remove all groups that do not exist in a standard archlinux install. This includes the sudo group. I'm also going to set Does this work for you/are there any objections? |
Hi @kpcyrd, thanks for asking! Removal of the PS: I should mention that image-bootstrap uses cloud-init 0.7.6 still because upgrading resulted in non-trivial breakage, regarding network and hostnames for instance, afair. I'd be happy to upgrade to 0.7.9+ but I'll need help with that. |
@hartwork I think we can work around not having a |
|
@hartwork this would be true for |
Of course, my bad. I'd vote for having cloud-init depend on sudo on package level. Is that an option? |
@hartwork that might work, I've added sudo as a dependency and the user to the wheel group. The wheel group is not configured by default, as far as I can tell the sudo attribute from the config is prefixed with the username and should work without an explicit group. Could you try if 17.2-5 works for you? |
Looks good to me but I cannot help test it. |
This is taken care of by
cloud-init
. When the user is created through_create_sudo_nopasswd_user
, thecloud-init
user creation code doesn't kick in because it detects that the user already exists:This in turn means that the modifications made by
adjust_cloud_cfg_dict
and friends do not take effect, and the user does not get added to other groups such asadm
.The text was updated successfully, but these errors were encountered: