Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Sysinst default root login shell



On Wed, Apr 11, 2012 at 12:41:24PM -0700, Wraukon the Excellent wrote:
> > 
> > I still don't understand why anyone wants to specifically run bash.
> 

Gotta love this... 40 years on and we STILL have shell wars!  Who says
tradition is dead?

> 
> I conditionally exec 'bash -l' as root (dependent upon whether or not it
> exists).  If not, no big deal, I get 'csh'.  If I need 'sh' I know where
> to find it and how to use it, and I try VERY hard not to have to write
> bash scripts [but there is some handy stuff in there].
> 

Just a note that conditionally exec'ing anything can shoot you in the
foot in some environments.  Consider having your shell on a NFS mount
and that NFS server is down - the check for the existence of the shell
will hang waiting for the mount to come back, if you have the right
mount flags you _could_ interrupt the wait, maybe.  If you don't then
you are well and truly hosed.  There are other more unlikely scenarios
like a mangled binary or shared library that mean the presence check
passes but the exec hand off fails dumping you back to the login...
sometimes trying to be clever just means you are drawing a bead on a
foot ;)

I normally just coopt the toor account to run my shell of choice and
leave the root login at /bin/sh.  This way if everything else goes fubar
I still have the standard root login available.

-- 
Brett Lymn
"Warning:
The information contained in this email and any attached files is
confidential to BAE Systems Australia. If you are not the intended
recipient, any use, disclosure or copying of this email or any
attachments is expressly prohibited.  If you have received this email
in error, please notify us immediately. VIRUS: Every care has been
taken to ensure this email and its attachments are virus free,
however, any loss or damage incurred in using this email is not the
sender's responsibility.  It is your responsibility to ensure virus
checks are completed before installing any data sent in this email to
your computer."




Home | Main Index | Thread Index | Old Index