Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] [PATCH] acct-user.eclass: don't modify existing user by default
Date: Mon, 04 Jan 2021 16:54:50
Message-Id: CAJ0EP41QmqSD-ZX5Vb-Edrcu5cwbZyyU+agRz9a_dNa-8Oqn5g@mail.gmail.com
In Reply to: Re: [gentoo-dev] [PATCH] acct-user.eclass: don't modify existing user by default by Thomas Deutschmann
1 On Mon, Jan 4, 2021 at 11:34 AM Thomas Deutschmann <whissi@g.o> wrote:
2 >
3 > On 2021-01-04 17:30, Thomas Deutschmann wrote:
4 > > On 2021-01-04 17:28, Michał Górny wrote:
5 > >> It must be a bug in your version of the eclass. I've just reemerged
6 > >> acct-group/wheel and to*my great surprise* I'm still there. How
7 > >> unexpected!
8 > >
9 > > That's why I wrote
10 > >
11 > > > (luckily groups like wheel don't have users...)
12 > >
13 > > I meant that there is no acct-user/wheel because otherwise this group
14 > > would get cleaned (reset), too.
15 >
16 > Best example is portage. Follow handbook. Add your user to portage's group:
17 >
18 > > usermod -aG <your user> portage
19
20 I don't see any mention of usermod in the handbook, so I'm not sure
21 where this came from.
22
23 As mgorny pointed out, you are invoking usermod incorrectly. You want
24 this instead:
25
26 usermod -aG portage <your user>
27
28 Don't use "id" to list group members. That lists groups of which a
29 user is a member. Use getent instead:
30
31 getent group portage