From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 4 16:37:31 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11BC6106566C for ; Tue, 4 Oct 2011 16:37:31 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9A3D88FC08 for ; Tue, 4 Oct 2011 16:37:30 +0000 (UTC) Received: by wyj26 with SMTP id 26so991421wyj.13 for ; Tue, 04 Oct 2011 09:37:29 -0700 (PDT) Received: by 10.216.190.131 with SMTP id e3mr1742572wen.48.1317744404549; Tue, 04 Oct 2011 09:06:44 -0700 (PDT) Received: from dfleuriot-at-hi-media.com ([83.167.62.196]) by mx.google.com with ESMTPS id j18sm4737957wbo.6.2011.10.04.09.06.42 (version=SSLv3 cipher=OTHER); Tue, 04 Oct 2011 09:06:43 -0700 (PDT) Message-ID: <4E8B2F11.8050008@my.gd> Date: Tue, 04 Oct 2011 18:06:41 +0200 From: Damien Fleuriot User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <20111004.150623.171.1@DEV> In-Reply-To: <20111004.150623.171.1@DEV> Content-Type: text/plain; charset=windows-1250 Content-Transfer-Encoding: 7bit Subject: Re: Add user to croosworld DESTDIR X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2011 16:37:31 -0000 On 10/4/11 5:06 PM, rank1seeker@gmail.com wrote: > When I wana add user into DESTDIR, I chroot into it. > However, in this case, DESTDIR has an arch of amd64, while running machine is i386. > So that isn't an option as all execute attempts would fail(Exec format error). > > I've tried with pw's '-V etcdir' flag and it did created user in amd64 DESTDIR, BUT without home dir! > > I've found this: > http://docs.freebsd.org/cgi/getmsg.cgi?fetch=2108497+0+archive/2001/freebsd-questions/20011028.freebsd-questions > > I did however, managed to writte wrapper function, which created home and mail layout, as would original FreeBSD installation. > BUT, all $DESTDIR/home/$USER dirs, are owned by 0:0 and I can't find a way to chown it to DESTDIR user. > > That LAST step is all I need. > Anyone has any idea? > Grep the newly added user's UID/GID from $DESTDIR/etc/passwd , chown to these, should work even if they don't exist on your original system.