From owner-freebsd-questions@FreeBSD.ORG Sat Oct 6 15:22:49 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B403F16A421 for ; Sat, 6 Oct 2007 15:22:49 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from smtp.mel.people.net.au (smtp.mel.people.net.au [218.214.17.98]) by mx1.freebsd.org (Postfix) with SMTP id 725D713C4A5 for ; Sat, 6 Oct 2007 15:22:48 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: (qmail 16511 invoked from network); 6 Oct 2007 14:56:07 -0000 Received: from unknown (HELO blizzard.dnsalias.org) (218.215.130.189) by smtp.mel.people.net.au with SMTP; 6 Oct 2007 14:56:07 -0000 Received: by blizzard.dnsalias.org (Postfix, from userid 1001) id F0D3A1706D; Sun, 7 Oct 2007 00:56:03 +1000 (EST) Date: Sun, 7 Oct 2007 00:56:03 +1000 From: andrew clarke To: Jerahmy Pocott Message-ID: <20071006145603.GA11347@ozzmosis.com> References: <2F42244C-6F3F-48B3-AC05-FF068A791324@optusnet.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2F42244C-6F3F-48B3-AC05-FF068A791324@optusnet.com.au> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: FreeBSD Questions Subject: Re: BASH as root shell (static linking) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2007 15:22:49 -0000 On Sat, Oct 06, 2007 at 04:54:26AM +1000, Jerahmy Pocott wrote: > I'm wanting to use BASH as my root shell, so I compiled a statically linked > version then tried to log in with only / mounted. But I was locked out > because elf.ld.so could not be found.. > > I though elf was the native binary format these days? But it needs a > library to run them? Is it possible to statically link against elf? Or do > standalone binary have to be in aout format? I'm a bit confused as to why it > requires this dynamic library.. I'm not sure if this helps at all, but you can build a static version of bash from the Ports tree: cd /usr/ports/shells/bash make WITH_STATIC_BASH=1 You'll need to cp bash to /bin. Regards Andrew