From owner-freebsd-questions Wed Oct 4 13:40:55 2000 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-27-149-77.mmcable.com [24.27.149.77]) by hub.freebsd.org (Postfix) with SMTP id F196737B502 for ; Wed, 4 Oct 2000 13:40:51 -0700 (PDT) Received: (qmail 17336 invoked by uid 100); 4 Oct 2000 17:54:05 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14811.28349.106218.501706@guru.mired.org> Date: Wed, 4 Oct 2000 12:54:05 -0500 (CDT) To: questions@freebsd.org Subject: Why not change roots shell? (was: I deleted my shell by mistake!!) X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG David Raistrick writes: > On Tue, 3 Oct 2000, Matt Rudderham wrote: > > >don't don't change root's shell! > > Why should the root shell not be changed? I am also kind of new I guess. I > The reasoning behind this is that if you lose your /usr (or > whatever) slice, you still have access to your root account. Of course, > I've never had a problem with this (mind you, I never managed to delete > the shell I was using whilst in multiuser mode...)since when you boot > single user, it /asks/ you what shell to use, and doesnt give a rats ass > what is in the master.passwd file..... Critical note - "when you boot to single user". Doing that may involve removing power when the system isn't really ready for it. That's not something you want to do lightly. > Anyway, I'd love to hear a sound reason why to never change your root > shell at all.. (I've never heard of that before, either...) It's all ancient lore. It's different between BSD and Linux because BSD changed it once upon a time. The giants of yore who did this are passing on the wisdom gained thereby in the taboo against changing the root shell. Tony Landells writes: > While I agree with most of the sentiments expressed by people saying > that much bad can come of changing root's shell, let me provide some > food for thought: > 3. Having a shell you're comfortable with makes life much easier > when something bad happens. You don't want to be messing around > trying to remember what does and doesn't work in this shell, or > making typos because you're doing everything long-hand just to > be safe, when you're trying to fix a disaster. This is actually an argument for being comfortable with the default root shell, not for making the default root shell one you're comfortable with. After all, if you're trying to fix a real disaster, there's a fair chance all you have available is the default root shell, because changing it on the FIXIT cd isn't quite as trivial as fixing it on a live system. > Personally, I tend to leave them they way they're installed on the > assumption that the "vendors" have picked a shell that will always > be there (even if the only filesystem I have is /). And having > done that, I occasionally get bitten because I try to do a loop, > for example, and I use the wrong syntax. Yup. I also aliased "su" to "su -", so I get my environment no matter who I su to. If I need to avoid that, there's always /usr/bin/su.