From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-embedded+bounces-3275-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1NKFKD-00019R-EG
	for garchives@archives.gentoo.org; Mon, 14 Dec 2009 18:07:15 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id D64A8E09AB;
	Mon, 14 Dec 2009 18:06:58 +0000 (UTC)
Received: from foo.birdnet.se (foo.birdnet.se [213.88.146.6])
	by pigeon.gentoo.org (Postfix) with SMTP id 757DEE0AE7
	for <gentoo-embedded@lists.gentoo.org>; Mon, 14 Dec 2009 18:06:58 +0000 (UTC)
Received: (qmail 29029 invoked by uid 501); 14 Dec 2009 18:06:57 -0000
Message-ID: <20091214180657.29028.qmail@stuge.se>
Date: Mon, 14 Dec 2009 19:06:57 +0100
From: Peter Stuge <peter@stuge.se>
To: gentoo-embedded@lists.gentoo.org
Subject: Re: [gentoo-embedded] emerge --root : users not created
Mail-Followup-To: gentoo-embedded@lists.gentoo.org
References: <166af1cf0912140817j66fb0ba3q96f1e8285790bc8@mail.gmail.com> <4B267265.7080406@wildgooses.com> <3dc1583f0912140947q106e673fkcb541cc8929c0321@mail.gmail.com>
Precedence: bulk
List-Post: <mailto:gentoo-embedded@lists.gentoo.org>
List-Help: <mailto:gentoo-embedded+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-embedded+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-embedded+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-embedded.gentoo.org>
X-BeenThere: gentoo-embedded@lists.gentoo.org
Reply-to: gentoo-embedded@lists.gentoo.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3dc1583f0912140947q106e673fkcb541cc8929c0321@mail.gmail.com>
X-Archives-Salt: 7a611ac0-6a6f-45af-9d15-5b515b72b45e
X-Archives-Hash: 9094e354d132cb5b52ab268e9fda4e75

Sven Rebhan wrote:
> The correct way to solve this would be to add an option to useradd,
> allowing to specify a passwd file other than /etc/passwd.
> Afterwards patch the corresponding eclass to use this option.
> Patches are welcome. ;-)

Looking at useradd.c at least four filenames should be changed;
passwd, shadow, group and sgroup.

The password db abstraction does allow easy changing of the file
names, but home directory, skel directory, mail spool and probably
more should also be changed, so maybe it makes sense to simply have
useradd call chroot() according to an option early on in main()?


//Peter