Re: /ports/Mk/Scripts/do-users-groups.sh: 8: parameter not set

From: Tomoaki AOKI <junchoon_at_dec.sakura.ne.jp>
Date: Thu, 15 Sep 2022 13:51:25 UTC
On Thu, 15 Sep 2022 10:44:56 +0200
Axel Rau <Axel.Rau@chaos1.de> wrote:

> 
> 
> > Am 14.09.2022 um 19:45 schrieb Axel Rau <Axel.Rau@chaos1.de>:
> > 
> > 
> > 
> >> Am 14.09.2022 um 19:15 schrieb Tomoaki AOKI <junchoon@dec.sakura.ne.jp <mailto:junchoon@dec.sakura.ne.jp>>:
> >> 
> >> On Wed, 14 Sep 2022 18:36:06 +0200
> >> Axel Rau <Axel.Rau@chaos1.de <mailto:Axel.Rau@chaos1.de>> wrote:
> >> 
> >>> /ports/Mk/Scripts/do-users-groups.sh: 8: parameter not set
> >>> *** Error code 2
> >>> - - -
> >> Without them, /ports/Mk/Scripts/do-users-groups.sh cannot know what to
> >> add.
> > 
> > root@home2l:/usr/local/src/fbsd_local_ports/net/home2l # grep home2l /usr/ports/UIDs
> > home2l:*:765:765:home2l Daemon:/usr/local/home2l:/usr/local/bin/bash
> > root@home2l:/usr/local/src/fbsd_local_ports/net/home2l # grep home2l /usr/ports/GIDs
> > home2l:*:765
> Added the missing trailing colon, but getting still same error.
> tar archive of port attached.
> 
> clueless,
> Axel
> 
> 
> ---
> PGP-Key: CDE74120  ☀  computing @ chaos claudius

Maybe I got it.

UIDs needs 10 field delimited with ":", but yours have only 7
(insufficient). For intermediate blank field, looks like "::",
but usually class field only.

You would need class, change, expire fields. class is usually blank or
daemon, and remaining ones are usually 0 (no need to change password,
user does not expire automatically).

And for GID, needs 4, but yours have 3 (insufficient, too).

Fixing GIDs alone is insufficient.

IIUC, entries for UIDs and GIDs would be (respectively) like below.
Sorry, UIDs is broken into 2 lines by my MUA.

UIDs
home2l:*:765:765::0:0:home2l
Daemon:/usr/local/home2l:/usr/local/bin/bash

GIDs
home2l:*:765:

See `man 5 passwd` and `man 5 group` for detail.

Sorry, not having enough time to look into attached port.
Hope someone more skilled pops in. 

-- 
Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>