tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Chaging uid/gid at binary install



On Thu, 24 Feb 2011, David Brownlee wrote:
> On 23 Feb 2011 07:27, "Steven Drake" <sbd%netbsd.org@localhost> wrote:
> > On Mon, 21 Feb 2011, Masao Uebayashi wrote:
> >> Can we provide a pre-defined pkgsrc username/UID "range"?
> >>
> >> For example, if I set PKG_UID_RANGE=500-999 and install foo-1.2.3
> >> which needs user "_foo" which has pkgsrc UID index 50, pkg_add(8)
> >> will useradd(8) user "_foo" as 550 and chown files.
> >>
> >> Does this sound reasonable?
> >
> > No! This is because there is no way of knowing if any uid/gid or range
> > is really free or not. E.g. what if uid 550 is already used?
> >
> > The current way may be a pain but it works, moving to a system with fixed
> > uids like you suggested would cause a lot of problems.
> >
>
I should have also said what if a user/group name already exists as some 
of them are very common.
E.g. uucp, games, news, mail, lp, named, sshd........
 
> I suspect for the majority of users the suggested change would cause much
> fewer problems.

Ok.

> Would the following address your concerns?
> - in the event of an existing passwd entry with conflicting data: either
> just fail or dynamically allocate from the top of the range (option)
> - have an option to always dynamically allocate (possibly from the top of
> the range)

Yes something like that, and with what I added above we'd have it add:
 - use as already existing user/group name even if it has a different 
 uid/gid.

-- 
Steven


Home | Main Index | Thread Index | Old Index