Gentoo Archives: gentoo-dev

From: Jaco Kroon <jaco@××××××.za>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] dynamic groups and users
Date: Thu, 01 Aug 2019 19:04:47
Message-Id: 76000f9a-31ac-f652-797a-d7494edac176@uls.co.za
1 Hi,
2
3 Looking at the new eclasses for acct-user and acct-group.
4
5 These enforce that a group and user id should be set.
6
7 This is not a requirement for enewuser nor enewgroup.
8
9 As a further discrepancy, the user eclass requires >0 for the IDs,
10 whereas the checks in acct-user and acct-group is for >= 0.
11
12 Would it be ok to suggest that we allow -1 (or 0, but that could be
13 confused with the root user/group) in acct-user and acct-group to
14 specify "no specific id, please allocate dynamically"?
15
16 Use case:  I'm building some experimental packages in an overlay, and I
17 really don't care what the UID and GID values are, I just need something
18 unique on the host I can use to avoid running the service as root. 
19 Guessing I could just manually useradd -r but then again ... if I do
20 later submit these into the main tree (or other packages) then it
21 becomes a problem, and maintaining acct-{user,group}/* outside of main
22 tree could conflict with main tree at a later stage ... either way,
23 having some way to say "I honestly don't care, just give me a random
24 number" is probably a good thing.
25
26 Kind Regards,
27 Jaco

Replies

Subject Author
Re: [gentoo-dev] dynamic groups and users Mike Gilbert <floppym@g.o>
Re: [gentoo-dev] dynamic groups and users "Michał Górny" <mgorny@g.o>
Re: [gentoo-dev] dynamic groups and users "Michał Górny" <mgorny@g.o>