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

Sean Whitton spwhitton at spwhitton.name
Tue Sep 21 23:38:54 BST 2021


Hello,

On Tue 14 Sep 2021 at 09:02PM -03, David Bremner wrote:

> 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.

Okay.  So what do you think about marking it with OS:DEBIANLIKE?

>> 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.

Right, I think my hypothetical case depended upon the proposal to drop
the gid parameter.

I do think the docstring should say that it modifies the
identically-named group.

-- 
Sean Whitton



More information about the sgo-software-discuss mailing list