Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Must "root" default to /bin/bash ? [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
gentsquash
l33t
l33t


Joined: 03 Nov 2004
Posts: 753
Location: Still a Gentoo beginner.

PostPosted: Mon Dec 27, 2004 5:50 am    Post subject: Must "root" default to /bin/bash ? [SOLVED] Reply with quote

My wise Linux friend (the one who kindly installed Gentoo for me)
tells me that normal users can run `tcsh' or other shells, but
that user "root" had BDW ("better darn well") run /bin/bash.
When asked why, I got the hacker equivalent of "because otherwise
planets will wobble in their orbits --you can DO it, but I don't
want to be on the same continent when you do...
".

Does "root" really need to have /bin/bash in his line in
"/etc/passwd"? --and if so, why?

(And, if you are in the mood for another `bash' query,

https://forums.gentoo.org/viewtopic.php?p=1911399#1911399

still has me stuck.)
_________________
Your thread resolved? Putting [SOLVED] in its title helps all Gentooers. (Button "edit" , first post)
Prof. Jonathan LF King, Mathematics dept., University of Florida


Last edited by gentsquash on Mon Jan 03, 2005 10:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Mon Dec 27, 2004 7:08 am    Post subject: Reply with quote

No. I always use tcsh and/or csh depending on the *nix variant. In fact SunOS used to default to csh for root.
_________________
The free market gave me gonorrhea.
Back to top
View user's profile Send private message
Darkael
Veteran
Veteran


Joined: 10 Aug 2004
Posts: 1321
Location: France

PostPosted: Mon Dec 27, 2004 11:59 am    Post subject: Reply with quote

I've used zsh as root for months and I've never seen anything wrong.
But don't delete bash, some nasty programs need it sometimes.
Back to top
View user's profile Send private message
EdSchouten
Tux's lil' helper
Tux's lil' helper


Joined: 07 Oct 2003
Posts: 79

PostPosted: Mon Dec 27, 2004 12:07 pm    Post subject: Reply with quote

KarnEvil wrote:
I've used zsh as root for months and I've never seen anything wrong.


In fact, as root it is safer to use than bash. Example:

Code:

rm -rf .*


Don't do this with bash! :lol:
Back to top
View user's profile Send private message
fishhead
Apprentice
Apprentice


Joined: 07 Mar 2003
Posts: 162
Location: Pasadena, CA

PostPosted: Wed Dec 29, 2004 10:33 am    Post subject: Reply with quote

If you use the command useradd with some additional arguments, it will let you make multiple users with the same uid. You can use this to make "root", "root-csh","root-zsh", etc. Note that you will probably have to change their passwords seperately.
Back to top
View user's profile Send private message
tutaepaki
Apprentice
Apprentice


Joined: 11 Nov 2003
Posts: 279
Location: New Zealand

PostPosted: Wed Dec 29, 2004 7:39 pm    Post subject: Reply with quote

This is probably just from the "old days", when bash wasn't on your / filesystem, (I vaguely recall it being in /usr/bin on an old RH system) and root should never depend on something outside of your / filesystem. (ie /bin or /sbin only)
Back to top
View user's profile Send private message
PapaSMURFFS
n00b
n00b


Joined: 23 Sep 2004
Posts: 53
Location: Toronto, Canada

PostPosted: Thu Dec 30, 2004 12:50 am    Post subject: Reply with quote

The shell root uses doesn't matter in the least -- as long as /bin/sh exists (provided by bash) to run shell scripts.

However, if it was an important server or something I'd compile whichever shell root is using as a static binary so if your filesystem becomes corrupt there is a better chance of having a working shell to repair things from.
Back to top
View user's profile Send private message
gentsquash
l33t
l33t


Joined: 03 Nov 2004
Posts: 753
Location: Still a Gentoo beginner.

PostPosted: Mon Jan 03, 2005 10:18 pm    Post subject: Reply with quote

Thank you for all the replies. I'll mark this as [SOLVED], and
will nonetheless ask:

What is a "static binary"? (Just "not dynamic!" doesn't cut it...)

Re: fishhead, why would it be beneficial to have different users
with the same user id? Aren't file-ownerships by uid, not by the
symbolic name? (ie "root" or "tux" or ...)
_________________
Your thread resolved? Putting [SOLVED] in its title helps all Gentooers. (Button "edit" , first post)
Prof. Jonathan LF King, Mathematics dept., University of Florida
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum