Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Oct 2000 12:54:05 -0500 (CDT)
From:      Mike Meyer <mwm@mired.org>
To:        questions@freebsd.org
Subject:   Why not change roots shell? (was: I deleted my shell by mistake!!)
Message-ID:  <14811.28349.106218.501706@guru.mired.org>

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

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.

	<mike


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?14811.28349.106218.501706>