Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 May 2000 21:24:59 -0400
From:      "Michael E. Mercer" <mmercer@ipass.net>
To:        Laurence Berland <stuyman@confusion.net>
Cc:        Harry Putnam <reader@newsguy.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Unix Virus.. Old but Nasty
Message-ID:  <391F51EB.2B15862A@ipass.net>
References:  <m2zopswrui.fsf@reader.ptw.com> <391F4D14.1B486779@confusion.net>

next in thread | previous in thread | raw e-mail | index | archive | help
hello,

If your going to use another shell, you must compile a static version of it,
this way you will not have the problems of libraries not found if certain
file systems are not mounted...

just remember, compiling a static version will create a very large executable!

not sure of the other disadvantages of doing this, but there you go...

in the compile line just add -static ...

later
Michael

Laurence Berland wrote:

> Last I checked if you just change the root shell to bash it will do what
> you want.  FreeBSD should prompt for the root shell when you boot up in
> single user anyway, so you can just tell it /bin/sh or /bin/csh then.
>
> Laurence
>
> Harry Putnam wrote:
> >
> > I've heard is said, and glad to hear it, that Unix/unix-like OS are
> > immune to the nastiness going on in the wide world of windows.
> >
> > However, we Unix 'ers have had a very nasty virus spread around since
> > clear back in the seventies, its spead to thousands of machines.  So
> > insidious that it even comes installed on FreeBSD releases.
> >
> > Virulent nasty and troublesome, hard to get off the root partition.
> >
> > The querulous, ill manored, unhelpful, illbegotten viruretic C-shell
> > (csh), can be staved off with a dose of bashillin or zshillin.  Even
> > kshillin will cure it.
> >
> > But FreeBSD makes it so hard to get off the root partition.
> >
> > Joking aside, I've had about enough of the csh or sh shells. Enough
> > that it made me try to get rid of it.   Easily done for users but not
> > so, Root.
> >
> > I tried various schemes like putting a bash binary in /bin or
> > symlinking etc.  Setting a line in "~/.login" to execute bash.
> > Used `chsh'  etc etc.
> >
> > Being as how I am not particulary expert at this, I managed to bar
> > root from logging in at all, requiring emergency study of the very
> > helpful printed manual that came with my distribution.  Found my
> > saviours in 'boot -s' and 'fixit.flp'
> >
> > I was quite suprised to notice that the venerable "vi" is not resident
> > in /bin either.  Luckily I remembered enough about "ed" to edit
> > /etc/passwrd.  But that still didn't get the job done.
> >
> > Finally noticed how to mount / and /usr while in single mode and that
> > allowed access to `chsh'.  Which in this case was the culprit because
> > I'd put a call to bash there but later moved the binary back out of
> > /bin when I got errors from bash looking for its libraries on unmounted
> > /usr. So the file that `chsh' writes to was calling a binary no longer
> > there makinga login impossible.
> >
> > Well I hope a few of you get a laugh out of this anecdote.  But I'd
> > really really like to have someone explain to me how to setup root
> > with a bash shell.  That nasty old csh really does suck.
> >
> > Where the rub comes is when you have to log in from single mode (boot
> > -s) and none of the nifty stuff is mounted.
> >
> > Leaving csh and sh in place and just calling bash when running as root
> > is an option that works but it requirs extra steps when su'ing then
> > again when backing out.
> >
> > Maybe someone has a scipt that makes it more seamless.
> >
> > Something that notices when a user su's to root and hands them root in
> > a bash shell.  Or possibly something that notices when a login happens
> > in single mode and hands root a csh shell but the rest of the time
> > hands root a bash shell.
> >
> > Or some way to have bash only use libraries on / partition, or ......
> >
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of the message
>
> --
> Laurence Berland, Stuyvesant HS Debate
> <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
> Windows 98: n.
>         useless extension to a minor patch release for
>         32-bit extensions and a graphical shell for a
>         16-bit patch to an 8-bit operating system
>         originally coded for a 4-bit microprocessor,
>         written by a 2-bit company that can't stand for
>         1 bit of competition.
> http://stuy.debate.net
> icq #7434346                    aol imer E1101
> The above email Copyright (C) 2000 Laurence Berland
> All rights reserved
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?391F51EB.2B15862A>