Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Dec 2025 17:59:30 +0300
From:      Artem Bunichev <tembun@bk.ru>
To:        Tom Hukins <tom@freebsd.org>
Cc:        freebsd-doc@freebsd.org
Subject:   Re: Adopting users(7) and groups(7) manpages from NetBSD
Message-ID:  <20251206175930.a017fb944e9ebe8d9853c5b8@bk.ru>
In-Reply-To: <aTQ3dPXosPprEmP3@eborcom.com>
References:  <20251206143052.773a447321122e22959370af@bk.ru> <aTQ3dPXosPprEmP3@eborcom.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sat, 6 Dec 2025 14:02:28 +0000
Tom Hukins <tom@freebsd.org> wrote:
> On Sat, Dec 06, 2025 at 02:30:52PM +0300, Artem Bunichev wrote:
> > I couldn't find the following groups in FreeBSD: wsrc, maildrop,
> > postfix, named, _proxy (which in FreeBSD is called proxy), _timedc,
> > _sdpd, _httpd, _mdnsd, _tcpdump, _tss, _gpio, _dhcpcd (called dhcp in
> > FreeBSD), _rtadvd, etc...  For most part, I guess these are missed
> > because their programs are not in the FreeBSD base?
> 
> Yes, ports/packages specify UIDs and GIDS as described in
> https://docs.freebsd.org/en/books/porters-handbook/special/#users-and-groups
> which your manual page should mention.
> 
> Tom
> 

Thanks Tom!  I guess we should mention the place where {U,G}IDs are specified
for ports, but provide a description only for those, which are in the base
system only (/usr/src/etc/group)?

By the way, do you know, is there a good way to determine which {U,G}IDs a
particular program requires?  As for now, I haven't find a one unified way for
this.  For example, I found via git-blame(1) and commit descriptions that groups
`realtime` (GID 47) and `idletime` (GID 48) are used for mac_priority(4).  It
also described in rtprio(2) and mac_priority(4) manpages, but it's still not
very easy to trace the program by GID in /usr/src/etc/group only.  Or, I found
that dhclient(8) uses group `_dhcp`: I found this line
in /usr/src/sbin/dhclient/dhclient.c: `if ((pw = getpwnam("_dhcp")) == NULL)`.
I tried to search for getpwnam(3) usage in sources for other programs, it does
give some clues, but not very much.  And as I can see, string "_dhcp" used as
is, without any variable or #define, so I guess there is no really strict
policy for this matter.  So far I didn't find anything related in Makefiles
either.

Long story short, for now, I'm collecting info for each group in a very
personal way so to speak, but it would be nice to make this process easier. 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20251206175930.a017fb944e9ebe8d9853c5b8>