Subject: Re: pkg/16365: netsaint-base fails to create user and groups
To: None <bernd@arresum.inka.de>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 04/15/2002 20:09:14
> Try to install netsaint-base and notice the install erorrs
> while creating group and users:
>
> Creating group: netsaint
> groupadd: can't add group: gid 200 is a duplicate
> Creating group: netstadm
> Creating user: netsaint
> useradd: uid 200 is already in use
> Creating user: netstadm
> useradd: uid 201 is already in use
>
> These uid and gids are used for other purpose.
This was due to the default package settings being used.
If you look at the netsaint-base/Makefile.common file you'll see that
these values are all locally tunable:
NETSAINT_USER?= netsaint
NETSAINT_USER_ID?= 200
NETSAINT_GROUP?= netsaint
NETSAINT_GROUP_ID?= 200
NETSTADM_USER?= netstadm
NETSTADM_USER_ID?= 201
NETSTADM_GROUP?= netstadm
NETSTADM_GROUP_ID?= 201
[[....]]
NETSTCMD_USER?= ${APACHE_SUEXEC_USER}
NETSTCMD_GROUP?= ${APACHE_SUEXEC_GROUP}
> >Fix:
> Do NOT use fixed uid and gids.
No the correct "fix" is to properly tune your pkgsrc defaults to suit
your local environment and policies before you (try to) install a
package! :-)
I'd love to avoid this problem, but the current tools are not
ammenable to properly controlling the parameters for user and group
creation and without using fixed values it is impossible to enforce
local policies.
(FYI, the updated netsaint packages I'm just about finished testing will
include a suggested patch for the mk/bsd.pkg.defaults.mk file so that
the tunable make variables are properly documented.)
--
Greg A. Woods
+1 416 218-0098; <gwoods@acm.org>; <g.a.woods@ieee.org>; <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>