Re: BASH as root shell (static linking)
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.. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
On Sat, Oct 06, 2007 at 01:55:28AM +0100, RW wrote: > On Fri, 5 Oct 2007 20:09:46 -0400 > Jerry McAllister <[EMAIL PROTECTED]> wrote: > > > On Sat, Oct 06, 2007 at 12:32:22AM +0100, RW wrote: > > > > > On Fri, 5 Oct 2007 16:29:36 -0700 (PDT) > > > Philip Hallstrom <[EMAIL PROTECTED]> wrote: > > > > > > > > On 06/10/2007, at 5:45 AM, RW wrote: > > > > > > > > > >> On Sat, 6 Oct 2007 04:54:26 +1000 > > > > >> Jerahmy Pocott <[EMAIL PROTECTED]> wrote: > > > > >> > > > > >>> Hello, > > > > >>> > > > > >>> I'm wanting to use BASH as my root shell, so I compiled a > > > > >>> statically linked > > > > >> > > > > >> I would suggest using bash as your toor shell instead. toor > > > > >> exist precisely for this purpose. > > > > > > > > > > Yeah, I'v done that in the past, but I really dislike csh, I > > > > > don't want to use > > > > > it EVER =p > > > > > > I don't understand, why would you see csh if you login as toor > > > > It has no shell in the /etc/passwd entry by default. > > Maybe it then defaults to csh (which is really tcsh) if nothing > > else is given. > > It defaults to sh > > > Anyway, I prefer tcsh, but if the OP just has to have it bash, > > it is easy to do. > > I actually value my ignorance of tcsh, it prevents me doing anything > ambitious if I forget where I am. Explicitly selecting another shell is > like a safety-catch. And tsch is fairly friendly without knowing much > about it. > > > All the OP has to do is install bash from /usr/ports/shells/bash and > > then edit /etc/passwd to change the last field for toor - after the > > last colon - to point to where it installs bash (/usr/local/bin/bash > > maybe) and then it should all be fine. Actually, I forgot to mention that you also have to then put bash in /etc/shells. jerry > > Yes , that's what it's for. > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
On Friday 05 October 2007 22:51:53 Jerahmy Pocott wrote: > On 06/10/2007, at 4:59 AM, Brian A. Seklecki wrote: > > On Sat, 2007-10-06 at 04:54 +1000, Jerahmy Pocott wrote: > >> Hello, > >> > >> 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.. > > > > JP: > > > > Did: > > > > $ ldd /bin/bash > > > > Return anything? It should not. > > It's saying: > > libintl.so.6 => /usr/local/lib/libintl.so.6 (0x2819d000) > libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x281a6000) Most likely because you thought changing CFLAGS/LDFLAGS during port build, would make it statically linked, however if the link command has additional -Wl,-dynamic statements caused by `foo-config --libs` or .la files, then linker will resolve those libraries dynamically. As another poster stated in this thread, use the static option of the port. -- Mel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
On Sat, Oct 06, 2007 at 05:52 [EMAIL PROTECTED] said 'Who you talkin' to? You talkin' to [EMAIL PROTECTED] I didn't do nuttin'. I said: > Date: Fri, 5 Oct 2007 20:09:46 -0400 > From: Jerry McAllister <[EMAIL PROTECTED]> > Subject: Re: BASH as root shell (static linking) > On Sat, Oct 06, 2007 at 12:32:22AM +0100, RW wrote: > > On Fri, 5 Oct 2007 16:29:36 -0700 (PDT) > > Philip Hallstrom <[EMAIL PROTECTED]> wrote: > > > > On 06/10/2007, at 5:45 AM, RW wrote: > > > >> On Sat, 6 Oct 2007 04:54:26 +1000 > > > >> Jerahmy Pocott <[EMAIL PROTECTED]> wrote: > > > >>> Hello, > > > >>> I'm wanting to use BASH as my root shell, so I compiled a > > > >>> statically linked ... [deletia - wjv] > Or, maybe the OP managed to get it put in the /etc/passwd entry. > Anyway, I prefer tcsh, but if the OP just has to have it bash, > it is easy to do. > All the OP has to do is install bash from /usr/ports/shells/bash > and then edit /etc/passwd to change the last field for toor > - after the last colon - to point to where it installs bash > (/usr/local/bin/bash maybe) and then it should all be fine. No really - because in the original post the OP says he wanted to use this when only / was mounted. That means he should put his bash in /bin and make an entry to the /etc/shells. I do with ksh - my prefered shell for the last umpteen years. If you do have a shell you want to use all the time it had better be in /bin cause you will be lost if you get into single user mode from something like a crash and need to run utilities. Bill -- Bill Vermillion - bv @ wjv . com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
On 06/10/2007, at 3:25 PM, Old Ranger wrote: Hey look, BASH is not a UNIX shell. BASH occurred with Linux then carried over into FreeBSD. While it has "some" advantages, it is still a bastard. UNIX is written in "C" Want the best you can get? Use "tcsh" as a shell and let the linux community do whatever they want. I know a lot of elitists detest BASH, especially in the Linux camp (probably because zomg we can't use the default shell, we might be conforming to something and that's totally un-linuxy). But BASH is an excellent shell with most of the features from csh and ksh as well as the ability to run sh scripts. It was built to be POSIX compliant, not built for linux.. But this is all besides the point, I didn't ask what people think of BASH >.< I didn't ask how to set it as the root shell, what I asked about was creating a statically linked binary of BASH so that I COULD use it as the root shell! So that it could be used without /usr mountable.. Oh well.. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
Am Samstag 06 Oktober 2007 07:25:39 schrieb Old Ranger: > BASH is not a UNIX shell. > BASH occurred with Linux then carried over into FreeBSD. Get your history straight and read up on the heritage of the bash on gnu.org, please. BEFORE you start making absurd comments like these. (as if the bash was written FOR Linux...?) -- Heiko Wundram Product & Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
On Fri, 2007-10-05 at 23:25 -0600, Old Ranger wrote: [...snip...] > Want the best you can get? Use "tcsh" as a shell and let the linux ^^^ +1 Sincerely, -- Byung-Hee HWANG <[EMAIL PROTECTED]> This domain(izb.knu.ac.kr) is testing DKIM(RFC4871); flag: "t=y". If you encounter strange problems, please have a look at http://www.ietf.org/rfc/rfc4871.txt before throwing stones at me :-) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
RW wrote: On Fri, 5 Oct 2007 20:09:46 -0400 Jerry McAllister <[EMAIL PROTECTED]> wrote: On Sat, Oct 06, 2007 at 12:32:22AM +0100, RW wrote: On Fri, 5 Oct 2007 16:29:36 -0700 (PDT) Philip Hallstrom <[EMAIL PROTECTED]> wrote: On 06/10/2007, at 5:45 AM, RW wrote: On Sat, 6 Oct 2007 04:54:26 +1000 Jerahmy Pocott <[EMAIL PROTECTED]> wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked I would suggest using bash as your toor shell instead. toor exist precisely for this purpose. Yeah, I'v done that in the past, but I really dislike csh, I don't want to use it EVER =p I don't understand, why would you see csh if you login as toor It has no shell in the /etc/passwd entry by default. Maybe it then defaults to csh (which is really tcsh) if nothing else is given. It defaults to sh Anyway, I prefer tcsh, but if the OP just has to have it bash, it is easy to do. I actually value my ignorance of tcsh, it prevents me doing anything ambitious if I forget where I am. Explicitly selecting another shell is like a safety-catch. And tsch is fairly friendly without knowing much about it. All the OP has to do is install bash from /usr/ports/shells/bash and then edit /etc/passwd to change the last field for toor - after the last colon - to point to where it installs bash (/usr/local/bin/bash maybe) and then it should all be fine. Yes , that's what it's for. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" Hey look, BASH is not a UNIX shell. BASH occurred with Linux then carried over into FreeBSD. While it has "some" advantages, it is still a bastard. UNIX is written in "C" Want the best you can get? Use "tcsh" as a shell and let the linux community do whatever they want. SHEESH Z. Wade Hampton A UNIX person ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
On Fri, 5 Oct 2007 20:09:46 -0400 Jerry McAllister <[EMAIL PROTECTED]> wrote: > On Sat, Oct 06, 2007 at 12:32:22AM +0100, RW wrote: > > > On Fri, 5 Oct 2007 16:29:36 -0700 (PDT) > > Philip Hallstrom <[EMAIL PROTECTED]> wrote: > > > > > > On 06/10/2007, at 5:45 AM, RW wrote: > > > > > > > >> On Sat, 6 Oct 2007 04:54:26 +1000 > > > >> Jerahmy Pocott <[EMAIL PROTECTED]> wrote: > > > >> > > > >>> Hello, > > > >>> > > > >>> I'm wanting to use BASH as my root shell, so I compiled a > > > >>> statically linked > > > >> > > > >> I would suggest using bash as your toor shell instead. toor > > > >> exist precisely for this purpose. > > > > > > > > Yeah, I'v done that in the past, but I really dislike csh, I > > > > don't want to use > > > > it EVER =p > > > > I don't understand, why would you see csh if you login as toor > > It has no shell in the /etc/passwd entry by default. > Maybe it then defaults to csh (which is really tcsh) if nothing > else is given. It defaults to sh > Anyway, I prefer tcsh, but if the OP just has to have it bash, > it is easy to do. I actually value my ignorance of tcsh, it prevents me doing anything ambitious if I forget where I am. Explicitly selecting another shell is like a safety-catch. And tsch is fairly friendly without knowing much about it. > All the OP has to do is install bash from /usr/ports/shells/bash and > then edit /etc/passwd to change the last field for toor - after the > last colon - to point to where it installs bash (/usr/local/bin/bash > maybe) and then it should all be fine. Yes , that's what it's for. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
On Sat, Oct 06, 2007 at 12:32:22AM +0100, RW wrote: > On Fri, 5 Oct 2007 16:29:36 -0700 (PDT) > Philip Hallstrom <[EMAIL PROTECTED]> wrote: > > > > On 06/10/2007, at 5:45 AM, RW wrote: > > > > > >> On Sat, 6 Oct 2007 04:54:26 +1000 > > >> Jerahmy Pocott <[EMAIL PROTECTED]> wrote: > > >> > > >>> Hello, > > >>> > > >>> I'm wanting to use BASH as my root shell, so I compiled a > > >>> statically linked > > >> > > >> I would suggest using bash as your toor shell instead. toor exist > > >> precisely for this purpose. > > > > > > Yeah, I'v done that in the past, but I really dislike csh, I don't > > > want to use > > > it EVER =p > > I don't understand, why would you see csh if you login as toor It has no shell in the /etc/passwd entry by default. Maybe it then defaults to csh (which is really tcsh) if nothing else is given. Seems strange if it does that, but??? Or, maybe the OP managed to get it put in the /etc/passwd entry. Anyway, I prefer tcsh, but if the OP just has to have it bash, it is easy to do. All the OP has to do is install bash from /usr/ports/shells/bash and then edit /etc/passwd to change the last field for toor - after the last colon - to point to where it installs bash (/usr/local/bin/bash maybe) and then it should all be fine. jerry > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
On Fri, 5 Oct 2007 16:29:36 -0700 (PDT) Philip Hallstrom <[EMAIL PROTECTED]> wrote: > > On 06/10/2007, at 5:45 AM, RW wrote: > > > >> On Sat, 6 Oct 2007 04:54:26 +1000 > >> Jerahmy Pocott <[EMAIL PROTECTED]> wrote: > >> > >>> Hello, > >>> > >>> I'm wanting to use BASH as my root shell, so I compiled a > >>> statically linked > >> > >> I would suggest using bash as your toor shell instead. toor exist > >> precisely for this purpose. > > > > Yeah, I'v done that in the past, but I really dislike csh, I don't > > want to use > > it EVER =p I don't understand, why would you see csh if you login as toor ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
On 06/10/2007, at 5:45 AM, RW wrote: On Sat, 6 Oct 2007 04:54:26 +1000 Jerahmy Pocott <[EMAIL PROTECTED]> wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked I would suggest using bash as your toor shell instead. toor exist precisely for this purpose. Yeah, I'v done that in the past, but I really dislike csh, I don't want to use it EVER =p Use sudo... and alias 'su' to 'sudo -H bash'. That's what I do... but can always fall back to the default if necessary. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
On 06/10/2007, at 4:59 AM, Brian A. Seklecki wrote: On Sat, 2007-10-06 at 04:54 +1000, Jerahmy Pocott wrote: Hello, 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.. JP: Did: $ ldd /bin/bash Return anything? It should not. It's saying: libintl.so.6 => /usr/local/lib/libintl.so.6 (0x2819d000) libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x281a6000) Why is it linking these dynamically? It's not linking ncurses or libc dynamically.. Thanks! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
On 06/10/2007, at 5:45 AM, RW wrote: On Sat, 6 Oct 2007 04:54:26 +1000 Jerahmy Pocott <[EMAIL PROTECTED]> wrote: Hello, I'm wanting to use BASH as my root shell, so I compiled a statically linked I would suggest using bash as your toor shell instead. toor exist precisely for this purpose. Yeah, I'v done that in the past, but I really dislike csh, I don't want to use it EVER =p ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
On Sat, 6 Oct 2007 04:54:26 +1000 Jerahmy Pocott <[EMAIL PROTECTED]> wrote: > Hello, > > I'm wanting to use BASH as my root shell, so I compiled a statically > linked I would suggest using bash as your toor shell instead. toor exist precisely for this purpose. http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/book.html#TOOR-ACCOUNT ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: BASH as root shell (static linking)
On Sat, 2007-10-06 at 04:54 +1000, Jerahmy Pocott wrote: > Hello, > > 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.. JP: Did: $ ldd /bin/bash Return anything? It should not. ~BAS ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"