create new groups with cloud-config

1,270 views
Skip to first unread message

AoiK

unread,
Apr 22, 2015, 6:54:44 AM4/22/15
to coreo...@googlegroups.com
Hello,
Is there any way to create a new user by adding it to a new group that is not named after the user name with cloud-config?
I've read this reference and tried "groups" section in my cloud-config, but I got message like warning: unrecognized key "groups" and group was not created.

my cloud config looks like below :
groups:
  - foo

users:
  - name: aoi
    primary-group:foo # this is a creation-time field. will be ignored if account exists
    groups:
      - sudo
      - core


I'm currently using CoreOS607.0.0.
I'm also wondering how I can specify uid and gid when creating new ones with cloud-config.

Of course I could add them by commands manually but what I'm trying to do it to keep everything in cloud-config so that I can distribute the same configuration to the machines on the different platforms.

Brandon Philips

unread,
Apr 27, 2015, 7:07:38 PM4/27/15
to AoiK, coreos-user, Alex Crawford, Jonathan Boulle, Brian Waldon
Hello AoiK-

Our cloudinit does not implement this feature. If you would like to
file an issue to have this feature added you can do it over here:
https://github.com/coreos/coreos-cloudinit

You can sort of hack around this limitation by having a oneshot unit
that runs a script to add the groups.

The full documentation of the features in the CoreOS cloudinit is
here: https://coreos.com/docs/cluster-management/setup/cloudinit-cloud-config/

Thanks,

Brandon
> --
> You received this message because you are subscribed to the Google Groups
> "CoreOS User" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to coreos-user...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

ChandanC

unread,
Oct 21, 2016, 10:10:08 AM10/21/16
to CoreOS User, cadya...@gmail.com, alex.c...@coreos.com, jonatha...@coreos.com, brian....@coreos.com
Hi Brandon,

Has there been any update on this topic, for adding support for creating new groups and add support to provide UID and GID for the new user and group created. I could not find any update or see any issue logged in the Github link you had provided and no way to log one either.

Thanks
Chandan

david....@coreos.com

unread,
Oct 21, 2016, 3:14:47 PM10/21/16
to CoreOS User, cadya...@gmail.com
Hi,

I don't believe cloud-config is getting new features anymore.  Ignition, which is recommended over cloud-config, supports what you are requesting.  See the "passwd" section here:

https://coreos.com/ignition/docs/latest/configuration.html

Thanks.

David

ChandanC

unread,
Oct 24, 2016, 12:39:49 PM10/24/16
to CoreOS User, cadya...@gmail.com
Hi David,

Thanks for the update.
Reply all
Reply to author
Forward
0 new messages