Date: Sat, 6 Oct 2007 18:04:35 -0300 From: Aline de Freitas <aline@riseup.net> To: freebsd-questions@freebsd.org Subject: Re: BASH as root shell (static linking) Message-ID: <200710061804.35646.aline@riseup.net> In-Reply-To: <20071006145603.GA11347@ozzmosis.com> References: <2F42244C-6F3F-48B3-AC05-FF068A791324@optusnet.com.au> <20071006145603.GA11347@ozzmosis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 06 October 2007 11:56:03 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.
>
> Regards
> Andrew
Exactly. As a portupgrade user i've done in my pkgtools.conf:
MAKE_ARGS = {
'shells/bash' => [
'WITH_STATIC_BASH=yes',
],
}
AFTERINSTALL = {
'shells/bash' => 'cp /usr/local/bin/bash /bin'
}
And no more troubles even after portupgrade shells/bash :))
Aline
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710061804.35646.aline>
