1 |
On Thu, Aug 1, 2019 at 3:04 PM Jaco Kroon <jaco@××××××.za> wrote: |
2 |
> |
3 |
> Hi, |
4 |
> |
5 |
> Looking at the new eclasses for acct-user and acct-group. |
6 |
> |
7 |
> These enforce that a group and user id should be set. |
8 |
> |
9 |
> This is not a requirement for enewuser nor enewgroup. |
10 |
|
11 |
The new eclasses require you to set a fixed id, but they do not |
12 |
enforce that the id is available by default. If the id is taken |
13 |
already, it will allocate a new one. |
14 |
|
15 |
User/group 0 is pretty much guaranteed to always exist, so you could |
16 |
set ACCT_{GROUP,USER}_ID=0 to trigger the desired behavior. |
17 |
|
18 |
If you're feeling crazy, this will get you a random assignment between |
19 |
1 and 999, with the same fallback logic. |
20 |
|
21 |
ACCT_GROUP_ID=$(( RANDOM % 998 + 1 )) |