From owner-freebsd-questions@FreeBSD.ORG Sun Oct 7 11:02:53 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 8424016A41B for ; Sun, 7 Oct 2007 11:02:53 +0000 (UTC) (envelope-from quakenet1@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id 123CE13C44B for ; Sun, 7 Oct 2007 11:02:52 +0000 (UTC) (envelope-from quakenet1@optusnet.com.au) Received: from [10.0.0.3] (c220-239-13-242.belrs4.nsw.optusnet.com.au [220.239.13.242]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id l97B2pBE004947 for ; Sun, 7 Oct 2007 21:02:51 +1000 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <20071006145603.GA11347@ozzmosis.com> References: <2F42244C-6F3F-48B3-AC05-FF068A791324@optusnet.com.au> <20071006145603.GA11347@ozzmosis.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <2757D900-0CD9-4B98-AC9B-2D6B610792C7@optusnet.com.au> Content-Transfer-Encoding: 7bit From: Jerahmy Pocott Date: Sun, 7 Oct 2007 21:02:50 +1000 To: FreeBSD Questions X-Mailer: Apple Mail (2.752.2) 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: Sun, 07 Oct 2007 11:02:53 -0000 On 07/10/2007, at 12:56 AM, andrew clarke wrote: > 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. Thanks, that was the information I was looking for! I didn't know about that option to the port.. The problem seemed to be with the dependancies, libintl is dynamically linked to libiconv and some how that was causing it to build with a dynamic link..