[LEDE-DEV] convention on uid/gid for packages

Yousong Zhou yszhou4tech at gmail.com
Mon May 15 08:46:22 PDT 2017


On 15 May 2017 at 23:29, Val Kulkov <val.kulkov at gmail.com> wrote:
> Yousong, perhaps I was not clear. What I am suggesting is to change
> the auto-allocation to start from 1000 rather than from 100 (1000 is
> just a suggestion, it could be anything else that is high enough), and
> to have a convention to allocate the 1-999 range to the services.
> Then, the allocation of uid/gid for any new package would be subject
> to review and approval by the reviewers. We would have to maintain a
> Wiki page listing all uids and gids that have already been taken,
> FreeBSD-style.
>
> This way, we would only have to reallocate uids and gids for packages
> that are 1000 and higher. The other packages that use uids and gids in
> the 1-999 range would not be affected, other than the packages that
> already have a conflict (icecast and postfix, for example).
>

I guess the the user, group related utility functions are intended for
use by services only.  Adding users and groups for multi-user
interactive is just not the use case for  LEDE (this is only personal
opinion and not in the book).

The suggestion is to let default_postinst to auto-allocation uid/gid
from 1 or 100, and let useradd/useradd/groupadd/addgroup to start from
whatever high number.

If we can automate things without separately maintaining a list of any
kind and manual cooperation across groups of people, we should prefer
that ;)

                yousong



More information about the Lede-dev mailing list