canonical / charm-local-users

A subordinate charm for creating and managing local user accounts and groups on principal units.
Apache License 2.0
0 stars 4 forks source link

Support matching user and group #9

Open jneo8 opened 11 months ago

jneo8 commented 11 months ago

If the group is the exact same as any of the users being created, the units will go into an error state. This is due to the fact that the group is created beforehand, and then the users are added.

There is no explicit --group flag to the adduser command, hence a group matching the username will be implicitly created, but it will fail if a group with such a name was already created by the charm.

Given that the charm allows to create only a single group and all users are put inside it, I am not sure what's the best course of action is. It could be just a matter of catching the issue and blocking instead of erroring, plus improving the docs. mentioning the restriction.


Imported from Launchpad using lp2gh.