[PATCH] add user:has-account-with-uid

David Bremner david at tethera.net
Wed Sep 15 01:02:44 BST 2021


Sean Whitton <spwhitton at spwhitton.name> writes:

>
> If you agree, then should gid remain an optional parameter, or should we
> always change the gid of the primary group to match the supplied uid?
> Can you think of a use case in which you would want to supply a
> different gid?

I can indeed. The original motivation for this property is a system
where at some point I created a group (I think with groupadd) with gid
1001. Later, after creating several users, I noticed all of the gid's
were one off from the uids.

> What I am thinking is that if USERNAME's primary group is not the
> identically-named group created by useradd, then it's probably a group
> which more than one user has as a primary group (e.g. "students"), in
> which case you wouldn't want to change its gid as that would affect
> other users; indeed it would break their homedirs.

Here I am only setting the gid of that identically named group (username
occurs twice, once for the groupmod, once of the usermod). So I think
this case cannot arise.



More information about the sgo-software-discuss mailing list