Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Jan 2000 12:04:59 -0800
From:      R Joseph Wright <rjoseph@nwlink.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: window manager question
Message-ID:  <3873A3EB.58082BFB@nwlink.com>
References:  <200001051806.TAA36854@dorifer.heim3.tu-clausthal.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Oliver Fromme wrote:
> 
> Jonathon McKitrick <jcm@dogma.freebsd-uk.eu.org> wrote in list.freebsd-questions:
>  > On Wed, 5 Jan 2000, R Joseph Wright wrote:
>  >>Why do you need toor to use a different shell?  I run root using bash
>  >>because sh and csh are annoying.  Whenever I've had to do a repair and
>  >>my /usr partition is not mounted, it defaults to sh.
>  >
>  > I just read somewhere (on this list) that it is good practice to leave the
>  > root account alone, and not change the shell.  But apparently this isn't
>  > really a big deal.
> 
> Indeed, it's not a big deal (at least on FreeBSD), but it's
> really good practive.  There are UNIX systems on which you run
> into trouble if you change root's login shell (for example,
> single-user mode might stop to work -- this is a non-issue on
> FreeBSD, because it asks you for the shell when it goes into
> single-user mode).
> 
> However, there are other reasons for leaving the root shell as
> it is.  For example, on a "big" box with several admins,
> changing root's shell would break POLA.  When I log into a
> UNIX box as root for some reason, I _expect_ it to have csh as
> login shell -- everything else would be confusing.  I can type
> ``/bin/sh -E'' anytime if I really want.
> 
> And finally, I tend to modify as few standard settings as
> possible.  If there's no good reason to change something, then
> I don't change it.  And IMO there is no good reason to change
> root's login shell.
> 
> For the above reasons (and because of "good practice"), I never
> change root's login shell.  Instead, I use ``su -m'' (as a
> normal user) to become root, which causes my root shell to be
> the same as my normal user shell (which happens to be zsh).
> In fact, my ``su'' is an alias for ``su -m''.
> 
> This is especially convenient on servers where multiple admins
> work, because every admin can have his own favourite shell when
> working as root, independent of all others, without having to
> dictate a certain shell on anybody, and (last but not least)
> without having to change root's login shell, so in case of
> emergency you can be certain that a csh will be there for you.
> 
> Regards
>    Oliver
> 
> PS:  No, I don't like csh either.  :-)

Does this mean that generally I should never login as root, even for
example when installing a new port?  I should do su instead?  If that's
the case, is there an rc file that I can use to get my su shell to
behave as my user shell?  For example, I like for the prompt to show my
user name and current working directory.

> 
> --
> Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany
> (Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de)
> 
> "In jedem Stück Kohle wartet ein Diamant auf seine Geburt"
>                                          (Terry Pratchett)
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

-- 
Best Regards, Joseph

	You will do foolish things,	
     but do them with enthusiasm.  Colette.


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?3873A3EB.58082BFB>