Subject: Re: Configuring user and group ids used by "pkgsrc"
To: Jeremy C. Reed <email@example.com>
From: David Brownlee <abs@NetBSD.org>
Date: 05/21/2007 17:53:15
On Mon, 21 May 2007, Jeremy C. Reed wrote:
> On Mon, 21 May 2007, Jeremy C. Reed wrote:
>> On Mon, 21 May 2007, Matthias Scheler wrote:
>>> when "pkgsrc" tries to add a user or group on my NetBSD system it checks
>>> all the existing accounts including the ones provided via NIS. As a
>>> results it picks a rather large user id larger in the space I use for
>>> NIS accounts and groups (>=1000).
>>> Is there a way to configure "pkgsrc" to use a certain range of user and
>>> group ids e.g. 500-999? I've currently set "PKG_CREATE_USERGROUP" to
>>> "no" which allows me to pick the user id manually. But that's not every
>>> comfortable of course.
>> No way that I know of currently.
>> It could easily be supported by systems that support it, like:
>> NetBSD's user add -r lowuid..highuid
>> or group add -r lowgid..highgid
>> But some systems don't support that.
> Just some more ideas...
> Have four variables for the high and low ranges for user and group. And
> then test for them and use them in the
> pkgsrc/mk/pkginstall/usergroupfuncs* scripts.
> Part of the problem is that an operating system may have older (or newer)
> "useradd" that supports it differently.
Alternatively, allocate each pkgsrc user a uid offset, and for
each OS assign a uid base. uid base+offset is not free, the
package bails and lets the user set it up by hand.
Anyone can override the uid base, and more importantly if the uids
allocated do not change if you install packages in a different
David/absolute -- www.NetBSD.org: No hype required --