Skip site navigation (1)Skip section navigation (2)
Date:      14 May 2000 17:59:49 -0700
From:      Harry Putnam <reader@newsguy.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Unix Virus.. Old but Nasty
Message-ID:  <m2zopswrui.fsf@reader.ptw.com>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m2zopswrui.fsf>