alternative shell

alternative shell

Post by Kelvi » Wed, 01 Jan 2003 12:17:26



Hi ;
   I have configured root account to use bash during login. How do I
configure to force root account falllback to use csh whenever the system
can't the bash ?
Please advise .
 
 
 

alternative shell

Post by erik » Wed, 01 Jan 2003 12:38:04



> Hi ;
>    I have configured root account to use bash during login. How do I
> configure to force root account falllback to use csh whenever the system
> can't the bash ?
> Please advise .

You cannot to my knowledge. Bad choice. Start bash from within your login
shell is the most common option.

EJ
--
Remove the obvious part (including the dot) for my email address

 
 
 

alternative shell

Post by Anthony Schlemme » Wed, 01 Jan 2003 14:27:53


What I did with bash was to change the prefix that pkg_add uses so bash
got installed in /bin rather than /usr/local/bin when I installed the
bash package. This makes "bash" available as long as my system's root
filesystem can be mounted. Same goes for "csh" here it also resides in
/bin.

Tony


> Hi ;
>    I have configured root account to use bash during login. How do I
> configure to force root account falllback to use csh whenever the system
> can't the bash ?
> Please advise .

--
Anthony Schlemmer

 
 
 

alternative shell

Post by G.T. » Wed, 01 Jan 2003 15:37:16



> What I did with bash was to change the prefix that pkg_add uses so bash
> got installed in /bin rather than /usr/local/bin when I installed the
> bash package. This makes "bash" available as long as my system's root
> filesystem can be mounted. Same goes for "csh" here it also resides in
> /bin.

I hope you used the static package of bash.

Anyway, why people mess with root accounts is beyond me.  I hope that
doesn't suggest that you're all working as root all day long.  If not,
what's so hard about just starting bash from the default shell?  Anybody
ever heard of K.I.S.S.?

Greg


>>Hi ;
>>   I have configured root account to use bash during login. How do I
>>configure to force root account falllback to use csh whenever the system
>>can't the bash ?
>>Please advise .

--
"Destroy your safe and happy lives before it is too late,
the battles we fought were long and hard,
just not to be consumed by rock n' roll..." - The Mekons
 
 
 

alternative shell

Post by u.. » Wed, 01 Jan 2003 17:17:40


Hi,

Try section "Bourne Shell again" in FreeBSD Cheat Sheets:
http://mostgraveconcern.com/freebsd/

-pekka-


> Hi ;
>    I have configured root account to use bash during login. How do I
> configure to force root account falllback to use csh whenever the system
> can't the bash ?
> Please advise .

 
 
 

alternative shell

Post by Jan-Uwe Fin » Wed, 01 Jan 2003 18:47:46



> Hi ;
>    I have configured root account to use bash during login. How do I
> configure to force root account falllback to use csh whenever the system
> can't the bash ?
> Please advise .

Just use /bin/ksh.
 
 
 

alternative shell

Post by Anthony Schlemme » Thu, 02 Jan 2003 03:29:07


Yes I installed the static bash package. I sure don't stay logged in as
root all day. I just prefer the way bash works in terms of command line
editing.

Tony



>> What I did with bash was to change the prefix that pkg_add uses so bash
>> got installed in /bin rather than /usr/local/bin when I installed the
>> bash package. This makes "bash" available as long as my system's root
>> filesystem can be mounted. Same goes for "csh" here it also resides in
>> /bin.

> I hope you used the static package of bash.
> Anyway, why people mess with root accounts is beyond me.  I hope that
> doesn't suggest that you're all working as root all day long.  If not,
> what's so hard about just starting bash from the default shell?  Anybody
> ever heard of K.I.S.S.?
> Greg


>>>Hi ;
>>>   I have configured root account to use bash during login. How do I
>>>configure to force root account falllback to use csh whenever the system
>>>can't the bash ?
>>>Please advise .

> --
> "Destroy your safe and happy lives before it is too late,
> the battles we fought were long and hard,
> just not to be consumed by rock n' roll..." - The Mekons

--
Anthony Schlemmer

 
 
 

alternative shell

Post by G.T. » Thu, 02 Jan 2003 05:06:12



> Yes I installed the static bash package. I sure don't stay logged in as
> root all day. I just prefer the way bash works in terms of command line
> editing.

So start bash from the default shell.

Greg

--
"Destroy your safe and happy lives before it is too late,
the battles we fought were long and hard,
just not to be consumed by rock n' roll..." - The Mekons

 
 
 

alternative shell

Post by Mark La » Fri, 03 Jan 2003 16:42:06


Rule #1 of Unix Administration, don't *uck with Root's shell.
Reasons:
On some systems root's shell is assumed to be a specific shell and some
things go wrong if you change it.

Some scripts that root runs may not work if you change shells.

If you share root with other users, a change of shells will surprise
them when things don't work as expected.

Basically it's a bad sysadmin habit and should be stamped out.  Besides,
BASH is evil and corrupts people that then want to install it
everywhere, write non-portable shell scripts with it, and can't cope
when they don't have it installed.
Same goes for all emacs weenies, I'm not going to have it installed on
any of my servers at work just 'cos one sysadmin can't be bothered to
learn vi.

M.

 
 
 

alternative shell

Post by harmoniou » Fri, 10 Jan 2003 04:28:49



> Rule #1 of Unix Administration, don't *uck with Root's shell.
> Reasons:
> On some systems root's shell is assumed to be a specific shell and some
> things go wrong if you change it.

> Some scripts that root runs may not work if you change shells.

> If you share root with other users, a change of shells will surprise
> them when things don't work as expected.

> Basically it's a bad sysadmin habit and should be stamped out.  Besides,
> BASH is evil and corrupts people that then want to install it
> everywhere, write non-portable shell scripts with it, and can't cope
> when they don't have it installed.
> Same goes for all emacs weenies, I'm not going to have it installed on
> any of my servers at work just 'cos one sysadmin can't be bothered to
> learn vi.

> M.

Yea, thats right
fr0stee
 
 
 

alternative shell

Post by Bill Vermilli » Thu, 23 Jan 2003 15:57:16




>Rule #1 of Unix Administration, don't *uck with Root's shell.
>Reasons: On some systems root's shell is assumed to be a
>specific shell and some things go wrong if you change it.

Yup.

Quote:>Some scripts that root runs may not work if you change shells.

But the other poster said /bin/ksh.  If that's the pdksh that might
be problematic.  However the real ksh - which is 100% Bourne
compatbile that I can tell - is availabe from AT&T.  Use that and
you'll have no problems.

Quote:>If you share root with other users, a change of shells will surprise
>them when things don't work as expected.

That's why the real ksh is so good.  It's indentical in useage
with the orginal as far as I can tell.

Quote:>Basically it's a bad sysadmin habit and should be stamped out.

Gee.  I guess I should not have been using it on the commercial
systems I've been admining for many years :-)

Quote:>Besides, BASH is evil and corrupts people that then want to
>install it everywhere,

I'll go along with that.  I had to recover a Sun by removing the HD
and repairing it on another since the admin for that machine had
put all his favorite Linuxisms and pathing and BASH.  When it
crashed you could not get inot a singlue user shell.  You could not
reinstall as it said the system was already installed.  I put it
in another machine, fsck'ed there, put it back and then proceeded
to put the machine back the way it was supposed to be.  The real
problem was that this was on a production server :-(

Quote:>Same goes for all emacs weenies, I'm not going to have it installed on
>any of my servers at work just 'cos one sysadmin can't be bothered to
>learn vi.

When I got vi on a system I was SO HAPPY.  I had been forced to
live with 'ed' for a year or so before that.  I got pretty good
on regex'es though.  That's been almost 20 years ago though. ed is
a great way to learn regexes.

Bill
--

 
 
 

alternative shell

Post by Dave Uhrin » Thu, 23 Jan 2003 22:39:09



> I'll go along with that.  I had to recover a Sun by removing the HD
> and repairing it on another since the admin for that machine had
> put all his favorite Linuxisms and pathing and BASH.  When it
> crashed you could not get inot a singlue user shell.  You could not
> reinstall as it said the system was already installed.  I put it
> in another machine, fsck'ed there, put it back and then proceeded
> to put the machine back the way it was supposed to be.  The real
> problem was that this was on a production server :-(

From the OBP prompt:

ok boot cdrom -s

# TERM=vt100; export TERM
# mount -F ufs -o rw /dev/dsk/c0t0d0s0 /a
# cd /a/etc
# vi passwd

Change root's shell back to /sbin/sh

# reboot

 
 
 

alternative shell

Post by James Grav » Sun, 26 Jan 2003 01:37:26




>>Rule #1 of Unix Administration, don't *uck with Root's shell.
>>Reasons: On some systems root's shell is assumed to be a
>>specific shell and some things go wrong if you change it.

>Yup.

Well, an argument can be made for changing the root shell to something
like sash, which has lots of handy commands built-in.  So that if your
shared libraries are messed up, you can still log in and fix them.  

At any rate, you ought to be using a statically-linked shell, not a
dynamically-linked bash or whatever.

I am one of those bash weenies, BTW.  :-)

I normally leave the root shell alone.  After I have logged in
sucessfully, I'll _then_ run bash if I can:

        exec /bin/bash --login

So I can have command-line editing, change the PATH, and have all my
favorite aliases.  Sure, it's a little inconvenient to type every time I
log in, but it's not that big a deal.  And it's much safer.

James

 
 
 

alternative shell

Post by Bill Vermilli » Fri, 14 Feb 2003 02:27:14






>>>Rule #1 of Unix Administration, don't *uck with Root's shell.
>>>Reasons: On some systems root's shell is assumed to be a
>>>specific shell and some things go wrong if you change it.
>>Yup.
>Well, an argument can be made for changing the root shell to something
>like sash, which has lots of handy commands built-in.  So that if your
>shared libraries are messed up, you can still log in and fix them.  
>At any rate, you ought to be using a statically-linked shell, not a
>dynamically-linked bash or whatever.

I like the BSD approach with everthing static. In /bin the only
dynamic file is rmail and in /sbin the only one mount_smbfs

Quote:>I am one of those bash weenies, BTW.  :-)

I prefer the ksh, and now that AT&T even puts out source and you
don't have to go through registration hoops it's a good choice.

Quote:>I normally leave the root shell alone.  After I have logged in
>sucessfully, I'll _then_ run bash if I can:
>    exec /bin/bash --login
>So I can have command-line editing, change the PATH, and have
>all my favorite aliases. Sure, it's a little inconvenient to
>type every time I log in, but it's not that big a deal. And it's
>much safer.

You could make a short script that does that.  

I've used a real KSH on all sorts of distributions - includning
a few commercial Unixen and have never had a problem.  The pdksh
seems to have quirks.

--