From owner-freebsd-questions Sun May 14 18:25:16 2000 Delivered-To: freebsd-questions@freebsd.org Received: from pluto.ipass.net (pluto.ipass.net [198.79.53.5]) by hub.freebsd.org (Postfix) with ESMTP id 7FE5A37B85E for ; Sun, 14 May 2000 18:25:12 -0700 (PDT) (envelope-from mmercer@ipass.net) Received: from ipass.net (dsl-2-196.dsl.rdu.ipass.net [209.170.144.196] (may be forged)) by pluto.ipass.net (8.9.3/8.9.3) with ESMTP id VAA16597; Sun, 14 May 2000 21:24:57 -0400 (EDT) Message-ID: <391F51EB.2B15862A@ipass.net> Date: Sun, 14 May 2000 21:24:59 -0400 From: "Michael E. Mercer" Reply-To: mmercer@ipass.net X-Mailer: Mozilla 4.72 [en] (X11; U; FreeBSD 4.0-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Laurence Berland Cc: Harry Putnam , freebsd-questions@FreeBSD.ORG Subject: Re: Unix Virus.. Old but Nasty References: <391F4D14.1B486779@confusion.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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