From: Mike Gilbert <floppym@gentoo.org>
To: Gentoo Dev <gentoo-dev@lists.gentoo.org>
Subject: Re: [gentoo-dev] dynamic groups and users
Date: Thu, 1 Aug 2019 16:01:37 -0400 [thread overview]
Message-ID: <CAJ0EP43fKHrGCzQWdGZ-UM-=DjhTxzKYhodeug2P=PLfCw3RFA@mail.gmail.com> (raw)
In-Reply-To: <76000f9a-31ac-f652-797a-d7494edac176@uls.co.za>
On Thu, Aug 1, 2019 at 3:04 PM Jaco Kroon <jaco@uls.co.za> wrote:
>
> Hi,
>
> Looking at the new eclasses for acct-user and acct-group.
>
> These enforce that a group and user id should be set.
>
> This is not a requirement for enewuser nor enewgroup.
The new eclasses require you to set a fixed id, but they do not
enforce that the id is available by default. If the id is taken
already, it will allocate a new one.
User/group 0 is pretty much guaranteed to always exist, so you could
set ACCT_{GROUP,USER}_ID=0 to trigger the desired behavior.
If you're feeling crazy, this will get you a random assignment between
1 and 999, with the same fallback logic.
ACCT_GROUP_ID=$(( RANDOM % 998 + 1 ))
next prev parent reply other threads:[~2019-08-01 20:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-01 19:04 [gentoo-dev] dynamic groups and users Jaco Kroon
2019-08-01 20:01 ` Mike Gilbert [this message]
2019-08-01 20:22 ` Jaco Kroon
2019-08-02 16:33 ` Mike Gilbert
2019-08-01 20:47 ` Michał Górny
2019-08-02 9:14 ` Jaco Kroon
2019-08-02 9:53 ` Michał Górny
2019-08-02 15:46 ` Michael Orlitzky
2019-08-02 15:58 ` Michał Górny
2019-08-02 16:24 ` Michael Orlitzky
2019-08-02 17:06 ` Michał Górny
2019-08-04 16:22 ` Jaco Kroon
2019-08-06 11:41 ` Jaco Kroon
2019-08-07 15:48 ` Michał Górny
2019-08-08 6:52 ` Jaco Kroon
2019-08-08 8:42 ` Ulrich Mueller
2019-08-08 10:04 ` Jaco Kroon
2019-08-03 0:53 ` James Cloos
2019-08-17 20:38 ` Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ0EP43fKHrGCzQWdGZ-UM-=DjhTxzKYhodeug2P=PLfCw3RFA@mail.gmail.com' \
--to=floppym@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox