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-3175-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1MjYhj-0006Xf-Vl
	for garchives@archives.gentoo.org; Fri, 04 Sep 2009 13:19:52 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id DBE12E0883;
	Fri,  4 Sep 2009 18:28:21 +0000 (UTC)
Received: from mail-yx0-f191.google.com (mail-yx0-f191.google.com [209.85.210.191])
	by pigeon.gentoo.org (Postfix) with ESMTP id B862DE0883
	for <gentoo-embedded@lists.gentoo.org>; Fri,  4 Sep 2009 18:28:21 +0000 (UTC)
Received: by yxe29 with SMTP id 29so4054828yxe.16
        for <gentoo-embedded@lists.gentoo.org>; Fri, 04 Sep 2009 11:28:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=gamma;
        h=domainkey-signature:mime-version:received:in-reply-to:references
         :date:message-id:subject:from:to:content-type;
        bh=O2OmV3TZcgeCFqgJJSfbpzHmL5OuQl5F7iL5y1aT3PI=;
        b=Cr6f/7Gc+4GFPw7zu+2idwxQNKuIEpxgixmPjhnWTneB9iaefC8rwPDpUAX0NA3jk4
         4XznxDx1Hq51pzc2jfn1GcVRQboQii82Actk5dmMa2sDqRdcfjX7YDYRXN1KNYF4PsA/
         GPleWOgswohCwBoENs0YsNhHlmSN4SRiHNeyA=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=googlemail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        b=G1rdbLS36FJeYwyw9gp6cSlwsKMiIhYXKQdhmRaum3kkbrtI5auDSPSBepQh69pzlx
         kj4dLrSrsbhUZH8yj+VzBF2kzsLcrY+YrmDxGvHTMlfNyCtBKgClYRF0EK2Zu9NhkgoZ
         ycjh1Z988AhLRgK7TZZAteJ/x0P/Awsx0Saqk=
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
Received: by 10.101.105.8 with SMTP id h8mr3168934anm.79.1252088901108; Fri, 
	04 Sep 2009 11:28:21 -0700 (PDT)
In-Reply-To: <4AA14BED.5010800@wildgooses.com>
References: <4AA14BED.5010800@wildgooses.com>
Date: Fri, 4 Sep 2009 20:28:21 +0200
Message-ID: <3dc1583f0909041128h53d08fbeqe248dc41668a7537@mail.gmail.com>
Subject: Re: [gentoo-embedded] Adding new users when using buildroot?
From: Sven Rebhan <odinshorse@googlemail.com>
To: gentoo-embedded@lists.gentoo.org
Content-Type: text/plain; charset=ISO-8859-1
X-Archives-Salt: 6f3b0604-fa87-4577-9acd-b936c4ca687e
X-Archives-Hash: dee8aafbd27ebcfd00e10c1a906263de

2009/9/4 Ed W <lists@wildgooses.com>:
> Obviously plenty of other ways to solve this, but curious if there is a
> solution within the portage build process?

I don't know of any standard way. Portage uses 'useradd' to generate
the new user
and this command does _not_ support a ROOT. The only (non-standard) way to
add a new user is by directly writing to /etc/passwd, but I'm not sure
if this works
on all OSes supported by Gentoo.

Anyway, if you follow http://gentoo.mindzoo.de/index.cgi/wiki/Cross%20Install
you will find the command

find /var/db/pkg -name '*.ebuild' -exec grep -qF 'pkg_postinst()' {}
\; -exec ebuild {} postinst \;

which reruns all postinstall sections of your cross-compiled system on
the target
and thus also creates the users.

Have fun!

    Sven