BASH as root shell (static linking)

andrew clarke mail at
Sat Oct 6 08:22:49 PDT 2007

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 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

You'll need to cp bash to /bin.


More information about the freebsd-questions mailing list