From owner-freebsd-questions Sun May 14 17:56: 1 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.networkone.net (mail.networkone.net [209.144.112.75]) by hub.freebsd.org (Postfix) with SMTP id 3CC6437B6A3 for ; Sun, 14 May 2000 17:55:59 -0700 (PDT) (envelope-from reader@newsguy.com) Received: (qmail 941 invoked from network); 15 May 2000 00:56:19 -0000 Received: from adsl-117-113.ln.networkone.net (HELO reader.ptw.com) (root@209.144.117.113) by mail.networkone.net with SMTP; 15 May 2000 00:56:19 -0000 Received: (from reader@localhost) by reader.ptw.com (8.9.3/8.9.3) id RAA01104; Sun, 14 May 2000 17:59:52 -0700 To: freebsd-questions@FreeBSD.ORG Subject: Unix Virus.. Old but Nasty From: Harry Putnam Date: 14 May 2000 17:59:49 -0700 Message-ID: User-Agent: Gnus/5.0804 (Gnus v5.8.4) Emacs/20.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 65 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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