Changing the default Shell for root under Redhat 6.1

Changing the default Shell for root under Redhat 6.1

Post by root » Fri, 04 Feb 2000 04:00:00



Hello
Can someone tell me how to change the Default Shell for root under
Redhat 6.1 ?
Thanks
 
 
 

Changing the default Shell for root under Redhat 6.1

Post by Greg Phillip » Fri, 04 Feb 2000 04:00:00



> Hello
> Can someone tell me how to change the Default Shell for root under
> Redhat 6.1 ?
> Thanks

Try changing it in /etc/passwd.

root:x:0:0::/root:/bin/bash

The last field "/bin/bash" is the default shell.  Change that to
whatever you like (i.e. /bin/tcsh).

_____________________
Greg Phillips
Network Administrator
MICGI

 
 
 

Changing the default Shell for root under Redhat 6.1

Post by DanH » Fri, 04 Feb 2000 04:00:00



> Hello
> Can someone tell me how to change the Default Shell for root under
> Redhat 6.1 ?
> Thanks

The last field in /etc/passwd is shell.  But root should not be used as
a normal day-to-day user.  Make yourself a user and log in as that. su -
to root when you need root's permissions, but don't stay there.

Dan
--
UNIX - Not just for vestal *s anymore
Linux - Choice of a GNU generation

 
 
 

Changing the default Shell for root under Redhat 6.1

Post by Dardo D Klein » Sat, 05 Feb 2000 04:00:00


You should avoid directly editing /etc/passwd as much as you can.

Use chsh to change a user's shell.

If you _must_ edit /etc/passwd, use /usr/sbin/vipw.


>Hello
>Can someone tell me how to change the Default Shell for root under
>Redhat 6.1 ?
>Thanks

 
 
 

Changing the default Shell for root under Redhat 6.1

Post by Kresimir Marz » Sat, 05 Feb 2000 04:00:00



>Hello
>Can someone tell me how to change the Default Shell for root under
>Redhat 6.1 ?
>Thanks

man chsh

--

     http://fly.srk.fer.hr/~kmarzic

 
 
 

Changing the default Shell for root under Redhat 6.1

Post by Claudiu Cismar » Sat, 05 Feb 2000 04:00:00



> Hello
> Can someone tell me how to change the Default Shell for root under
> Redhat 6.1 ?
> Thanks

 Edit /etc/passwd file. at root line you have probably:

 root:x:0:0:...:/bin/bash

 change /bin/bash with your shell, eg:

 root:x:0:0:...:/bin/csh

 
 
 

Changing the default Shell for root under Redhat 6.1

Post by Michael Geor » Sat, 05 Feb 2000 04:00:00



>You should avoid directly editing /etc/passwd as much as you can.

>Use chsh to change a user's shell.

>If you _must_ edit /etc/passwd, use /usr/sbin/vipw.


>>Hello
>>Can someone tell me how to change the Default Shell for root under
>>Redhat 6.1 ?

Are you sure you want to do that?  Traditionally (and I admit this is quite a
ways back) we stuck with /bin/sh because it would always be mounted with the
root filesystem and it was rarely, if ever, changed, so you didn't have to
worry about bugs causing it to not start up.  You know what will happen if you
have a hosed machine and root's shell is mucked, don't you??

This may well not apply anymore, but I wanted to mention this so that you
don't rush off and do something that will bite your *in the future...

-Michael

--
Reply address is completely bogus.  The real address is:
        GEORGE <at symbol> MINTCITY <dot> COM
but in lowercase, not UPPERCASE
--
No, my friend, the way to have good and safe government, is not to trust it
all to one, but to divide it among the many, distributing to every one exactly
the functions he is competent to.  It is by dividing and subdividing these
republics from the national one down through all its subordinations, until it
ends in the administration of every man's farm by himself; by placing under
every one what his own eye may superintend, that all will be done for the
best.
                -- Thomas Jefferson, to Joseph Cabell, 1816

 
 
 

Changing the default Shell for root under Redhat 6.1

Post by Dardo D Klein » Sat, 05 Feb 2000 04:00:00


Quote:>Are you sure you want to do that?  Traditionally (and I admit this is quite a
>ways back) we stuck with /bin/sh because it would always be mounted with the
>root filesystem and it was rarely, if ever, changed, so you didn't have to
>worry about bugs causing it to not start up.  You know what will happen if you
>have a hosed machine and root's shell is mucked, don't you??

Not a bad suggestion at all... I would recommend leaving the default
root shell in place unless you really know what the implications are.
However, considering that (on Redhat), all of the shells (sh, tcsh,
csh, ash, bsh, bash, etc) are installed in /bin, I don't really see
much of a problem in regards to having them "available".  If /bin is
gone, you're pretty much SOL anyways (unless you have a good rescue
floppy, I've brought back "hosed" machines before by using tomsrtbt,
what a lifesaver that one is!)

As to the stability of the shell, unless its a really out-there one
(zsh or something, not to say that I know of any problems with zsh,
just that its "out-there" ;)), I would assume that the standard ones
are fairly trustworthy.

- Dardo

 
 
 

Changing the default Shell for root under Redhat 6.1

Post by Peter T. Breue » Sat, 05 Feb 2000 04:00:00



: Not a bad suggestion at all... I would recommend leaving the default
: root shell in place unless you really know what the implications are.

There are none. Apart from root getting to use a nice tcsh instead of
a * cumbersome bash when he/she su's in!

: csh, ash, bsh, bash, etc) are installed in /bin, I don't really see
: much of a problem in regards to having them "available".  If /bin is
: gone, you're pretty much SOL anyways (unless you have a good rescue
: floppy, I've brought back "hosed" machines before by using tomsrtbt,

What one needs is a statically linked shell for real emergencies. Any will do.
Then init=/bin/sash, for example. Booting with root=/dev/fd0 is also OK.
I keep a "spare" copy of / on disk just for emergencies. Mirrored every night.
There are other things you can do .. initrd/network boot from an nfs copy ..

Peter

 
 
 

Changing the default Shell for root under Redhat 6.1

Post by stev » Sat, 05 Feb 2000 04:00:00




> : Not a bad suggestion at all... I would recommend leaving the default
> : root shell in place unless you really know what the implications are.

> There are none. Apart from root getting to use a nice tcsh instead of
> a * cumbersome bash when he/she su's in!

Bash is a very powerful shell, I see no advantage to tcsh. Can you name
any? I use tcsh on IRIX systems, over csh. But since bash is the standard
for Linux, I learned bash. What do you find * or cumbersome about
bash?
Quote:

> : csh, ash, bsh, bash, etc) are installed in /bin, I don't really see
> : much of a problem in regards to having them "available".  If /bin is
> : gone, you're pretty much SOL anyways (unless you have a good rescue
> : floppy, I've brought back "hosed" machines before by using tomsrtbt,

> What one needs is a statically linked shell for real emergencies. Any will do.
> Then init=/bin/sash, for example. Booting with root=/dev/fd0 is also OK.
> I keep a "spare" copy of / on disk just for emergencies. Mirrored every night.
> There are other things you can do .. initrd/network boot from an nfs copy ..

> Peter

 
 
 

Changing the default Shell for root under Redhat 6.1

Post by Peter T. Breue » Sat, 05 Feb 2000 04:00:00




:> : Not a bad suggestion at all... I would recommend leaving the default
:> : root shell in place unless you really know what the implications are.
:>
:> There are none. Apart from root getting to use a nice tcsh instead of
:> a * cumbersome bash when he/she su's in!

: Bash is a very powerful shell, I see no advantage to tcsh. Can you name

(What's the disadvantage?). Bash's a programming language, not a shell.

: any?

Yes, it's much more comfortable. Instead of getting strange : characters when
I try and do things by hitting escape, I get the behaviour I'm expecting.
Be it command completion, file completion, or whatever. I have no idea how
to get the last command beginning "ca" in bash, even though I once looked it up.
It was nonintuitive enough that I forgot it immediately. Why couldn't they
at least copy the tcsh syntax if they were going to copy the functionality?

:      I use tcsh on IRIX systems, over csh. But since bash is the standard
: for Linux, I learned bash. What do you find * or cumbersome about
: bash?

No sensible command completion or file name completion options. It's spent
years trying to catch up as a shell to where csh derivatives have always been.
And why? What was the point? A sense of inadequacy? It's a wonderful programming
language so why bother to make it into a shell? I don't want to use perl or
tk as a shell either (though you can, with about the same appeal!).

Peter

 
 
 

Changing the default Shell for root under Redhat 6.1

Post by Gary Bran » Sat, 05 Feb 2000 04:00:00






> :> : Not a bad suggestion at all... I would recommend leaving the default
> :> : root shell in place unless you really know what the implications are.
> :>
> :> There are none. Apart from root getting to use a nice tcsh instead of
> :> a * cumbersome bash when he/she su's in!

> : Bash is a very powerful shell, I see no advantage to tcsh. Can you name

> (What's the disadvantage?). Bash's a programming language, not a shell.

> : any?

> Yes, it's much more comfortable. Instead of getting strange : characters when
> I try and do things by hitting escape, I get the behaviour I'm expecting.
> Be it command completion, file completion, or whatever. I have no idea how
> to get the last command beginning "ca" in bash, even though I once looked it up.
> It was nonintuitive enough that I forgot it immediately. Why couldn't they
> at least copy the tcsh syntax if they were going to copy the functionality?

> :      I use tcsh on IRIX systems, over csh. But since bash is the standard
> : for Linux, I learned bash. What do you find * or cumbersome about
> : bash?

> No sensible command completion or file name completion options. It's spent
> years trying to catch up as a shell to where csh derivatives have always been.
> And why? What was the point? A sense of inadequacy? It's a wonderful programming
> language so why bother to make it into a shell? I don't want to use perl or
> tk as a shell either (though you can, with about the same appeal!).

> Peter

I type <partial command> then <tab-key> instant completion.  This works for
both command/filename completion the same in bash as tcsh.  What's the
problem?
-Gary
 
 
 

Changing the default Shell for root under Redhat 6.1

Post by Bob Loftu » Sat, 05 Feb 2000 04:00:00



> Can someone tell me how to change the Default Shell for root under

This is a really bad idea no matter who's distro you are using.
Don't do it.

You should spend all of your time in another unprivileged
user account and su to root only when you cannot do what
is needed as a regular user.

Here's the unambiguous version:
Do nothing as root that cannot be accomplished by an ordinary user.

 
 
 

Changing the default Shell for root under Redhat 6.1

Post by Peter T. Breue » Sun, 06 Feb 2000 04:00:00





:> No sensible command completion or file name completion options. It's spent
:> years trying to catch up as a shell to where csh derivatives have always been.
:> And why? What was the point? A sense of inadequacy? It's a wonderful programming
:> language so why bother to make it into a shell? I don't want to use perl or
:> tk as a shell either (though you can, with about the same appeal!).
:>
: I type <partial command> then <tab-key> instant completion.  This works for
: both command/filename completion the same in bash as tcsh.  What's the
: problem?

For me it just beeps. I have to hit tab again to get possible
completions listed, and then go through the same rigmarole for
every extra char with multiple continuations. And then if there IS
a command matching what I have already got, it STILL brings up
a list of further continuations on tab, where I want it to stop and
offer me a space for an arg.

Anyway, I was talking about the history list, not command completion.

Peter

 
 
 

Changing the default Shell for root under Redhat 6.1

Post by Bob Niederma » Fri, 11 Feb 2000 04:00:00


This can be a very bad idea.  Many, many init, install, etc scripts run
as root.  Minor differences in shells may cause problems with any script
that doesn't specify which shell is used.

> Hello
> Can someone tell me how to change the Default Shell for root under
> Redhat 6.1 ?
> Thanks

 
 
 

1. How can I install a zip drive in Redhat 6.1, and change lilo default boot?

I have a NEC Zip drive, which is supported win95/98/NT. my linux system
detect it, it might be installed as well. But I don't known how to operate
it in the terminal. What should the directry of zip drive be? Please help
me? and how can I change lilo's default boot from linux to window 98?
Thank you very much!!!!

--
Posted via CNET Help.com
http://www.help.com/

2. dpid2 and logfiles

3. change Korn shell as root's default shell

4. lmbench on 2 Linux and 3 Sun boxes

5. Changing the default root shell

6. secure commerce server setup?

7. changing roots default shell

8. Where I can find Shell of FTP client sources in c or c++.

9. BAD: Change Root's Default Shell

10. Changing the default shell for root

11. Change root's default SHELL

12. Changing default shell for root

13. sending default shell for root in redhat