public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* Re: [gentoo-dev] Assigning unique system uid/gid for new ebuild
@ 2003-05-30 17:41 Vadim
  0 siblings, 0 replies; 14+ messages in thread
From: Vadim @ 2003-05-30 17:41 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 30 May 2003 17:18, Grant Goodyear wrote:
> > In principle packages should never depend on any fixed user id.
> > They should look at the passwd database for their uid. The only
> > exception is root which has a predefined userid.
>
> I believe that Mr. Lesser is asking how one decides on uid/gid's
> for new packages that should run as something other than root.
> (For example, apache runs as apache.apache, which maps to uid=81
> and gid=81, and those numbers are defined in the /etc/passwd file
> that's part of baselayout.)

How about fixing the system? For example something like this:

useradd foo
FOO_UID=`awk -F: '$1 == "foo" {printf $3}' /etc/passwd`
FOO_GID=`awk -F: '$1 == "foo" {printf $4}' /etc/passwd`

I've just started at trying to make ebuilds but I suppose this could
be put somewhere in an eclass.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+15fLvCkUtBccqkoRAgTdAKCoxbX3qhh7ZuykpHocE1XqYPCazwCdFt7y
iQP2BpHVxX7CDWxjKcPZDl4=
=lRYI
-----END PGP SIGNATURE-----


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 14+ messages in thread
* [gentoo-dev] Assigning unique system uid/gid for new ebuild
@ 2003-05-30 14:03 Martin Lesser
  2003-05-30 14:37 ` Paul de Vrieze
  0 siblings, 1 reply; 14+ messages in thread
From: Martin Lesser @ 2003-05-30 14:03 UTC (permalink / raw
  To: gentoo-dev

While writing an ebuild for nullmailer I would like to know how to
determine an unique uid/gid (nullmail/nullmail) which I need in the
script if I don't want to patch the Makefile.

Grepping through other ebuild's I saw that there are several packages
which also use useradd/groupadd with a given id (i.e. postgres=70).

Who assigns these ids used in several other ebuild's where system users
are needed?  How can I prevent id collisions without grepping through
other ebuild-files?

Or should I omit defining sys-users with a fixed id given?

TIA, Martin

--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2003-06-01 17:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-30 17:41 [gentoo-dev] Assigning unique system uid/gid for new ebuild Vadim
  -- strict thread matches above, loose matches on Subject: below --
2003-05-30 14:03 Martin Lesser
2003-05-30 14:37 ` Paul de Vrieze
2003-05-30 15:15   ` Martin Lesser
2003-05-30 15:18   ` Grant Goodyear
     [not found]     ` <200305301909.19817.vadim_t@teleline.es>
2003-05-30 17:50       ` Grant Goodyear
2003-05-31  8:53     ` Martin Lesser
2003-05-31  9:32       ` Paul de Vrieze
2003-05-31 10:30         ` Martin Lesser
2003-05-31  9:42       ` leon j. breedt
2003-05-31 10:03         ` Martin Lesser
2003-05-31 22:36       ` Pascal Bourguignon
2003-05-31 23:43       ` Evan Powers
2003-06-01 17:44         ` George Shapovalov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox