changing the root's shell
Hi ! Ouch ! SuSE 9.1 is quite different from a standard linux, isn't ? How can I change the root's shell from bash to tcsh ? I edited the file /etc/passwd, but the subsequent login as root, still have bash as shell. This is quite amazing ! Has SuSE tweaked the /bin/login ? any ideas ? I really like tcsh and I already have a whole bunch of files (.tcshrc*) setup for root. regards,
On Tuesday 29 June 2004 13:00, rozsas@supernet.com.br wrote:
Hi !
Ouch ! SuSE 9.1 is quite different from a standard linux, isn't ?
Not really. bash is the standard, default shell in most Linux distributions. I'm not sure which distro you're coming from to think this. What's "standard Linux"? I use csh all the time in my user account(it's my default). I rarely run as root, so I leave that alone. The idea is supposed to be that you run primarily in a user account - much safer.
How can I change the root's shell from bash to tcsh ? I edited the file /etc/passwd, but the subsequent login as root, still have bash as shell.
You should use the interface when doing this - it handles all the potential security layers you may or may not have implemented. Start up Yast - Security and Users/Edit and Create Users. Change the "Set Filter" on the lower right to "System users". Click on root, then "Edit", then "Details" In there you can set the shell for root. If this seems like a lot of work, it should be. The idea is to make an interface that keeps you from screwing up your system. Rarely should someone be altering default shells, even moreso for root.
This is quite amazing ! Has SuSE tweaked the /bin/login ?
Again. most distros nowadays have their own tweaks. Nothing really odd about it. I'm unaware of any "standard" that SUSE is somehow breaking convention with. Cheers, J.C. -- John Coldrick www.axyzfx.com Axyz Animation Houdini/Renderman/Discreet 425 Adelaide St W 416-504-0425 Toronto, ON Canada jc@axyzfx.com M5V 1S4 ----------------------------------------------------------------------- Nature is by and large to be found out of doors, a location where, it cannot be argued, there are never enough comfortable chairs. -- Fran Leibowitz
On Tuesday 29 June 2004 13:52, John Coldrick wrote:
Not really. bash is the standard, default shell in most Linux distributions. I'm not sure which distro you're coming from to think this. What's "standard Linux"?
I was talking in the way SuSE choose the user's shell. It's not sufficient (or even necessary ??) to change the 7th field of /etc/passwd ! Only by using "chsh" (see the post from Jerry Feldman) or by the way you explained below.
I use csh all the time in my user account(it's my default). I rarely run as root, so I leave that alone. The idea is supposed to be that you run primarily in a user account - much safer.
Sure, I agree and I do that, always. I change to root only as need to issue administrative commands. I know, I am a CLI user, mostly. So, a powerfull shell (or at least, a shell I know very well) is mandatory.
How can I change the root's shell from bash to tcsh ? I edited the file /etc/passwd, but the subsequent login as root, still have bash as shell.
You should use the interface when doing this - it handles all the potential security layers you may or may not have implemented. Start up Yast - Security and Users/Edit and Create Users. Change the "Set Filter" on the lower right to "System users". Click on root, then "Edit", then "Details" In there you can set the shell for root.
Is this worked, just like "chsh" command.
If this seems like a lot of work, it should be. The idea is to make an interface that keeps you from screwing up your system. Rarely should someone be altering default shells, even moreso for root.
This is quite amazing ! Has SuSE tweaked the /bin/login ?
Again. most distros nowadays have their own tweaks. Nothing really odd about it. I'm unaware of any "standard" that SUSE is somehow breaking convention with.
editing, carefully, the /etc/passwd would worked too. but not. Thank you for the hints about using YaST to do that. I learned one more way.
On Tue, 29 Jun 2004 14:00:35 -0300 (BRT) rozsas@supernet.com.br wrote:
Hi !
Ouch ! SuSE 9.1 is quite different from a standard linux, isn't ?
How can I change the root's shell from bash to tcsh ? I edited the file /etc/passwd, but the subsequent login as root, still have bash as shell.
This is quite amazing ! Has SuSE tweaked the /bin/login ?
any ideas ? I really like tcsh and I already have a whole bunch of files (.tcshrc*) setup for root. IMHO, the primary root shell (on Linux and Unix) should be a Bourne derived shell (sh or bash).
That said, log in as root, use the chsh command:
chsh -s /bin/tcsh root
That should work for you. I did that and subsequently logged in as root,
and the entry in /etc/password was changed correctly.
BTW: What do you mean by "standard Linux"?
--
Jerry Feldman
On Tuesday 29 June 2004 14:04, Jerry Feldman wrote:
IMHO, the primary root shell (on Linux and Unix) should be a Bourne derived shell (sh or bash).
Is there some strong reason to do that ? I mean, what is the real problem doing that ? tcsh is good as bash from this point of view, isn't ? besides historical reasons, I can't see any problem in using another shell. I change to root only as need, to do administrative tasks, and as root, I like to have the benefits from that particular shell.
That said, log in as root, use the chsh command: chsh -s /bin/tcsh root
Yeaahh ! It worked !
That should work for you. I did that and subsequently logged in as root, and the entry in /etc/password was changed correctly.
BTW: What do you mean by "standard Linux"?
In a "standard" linux (Solaris, SunOS, RedHat, Fedora, Conectiva), changing the 7th (the last one) field of /etc/passwd, you change the shell. Try your self ! On SuSE, changing the shell field by a direct edit on /etc/passwd you won't change the shell ! I triple check that before post this message.... Anyway, thanks for your time and winner answer :-) best regards,
On Tue, 2004-06-29 at 14:30, Miguel Angelo Rozsas wrote:
On Tuesday 29 June 2004 14:04, Jerry Feldman wrote:
IMHO, the primary root shell (on Linux and Unix) should be a Bourne derived shell (sh or bash).
Is there some strong reason to do that ? I mean, what is the real problem doing that ? tcsh is good as bash from this point of view, isn't ? besides historical reasons, I can't see any problem in using another shell.
I change to root only as need, to do administrative tasks, and as root, I like to have the benefits from that particular shell.
There are many scripts that run when the system is started that expect root's shell to be either sh or bash and will not run properly under tsch. Change it at your own risk. -- Ken Schneider unix user since 1989 linux user since 1994 SuSE user since 1998 (5.2)
On Tuesday 29 June 2004 15:53, Ken Schneider wrote: l
There are many scripts that run when the system is started that expect root's shell to be either sh or bash and will not run properly under tsch. Change it at your own risk.
Yes, this happened to me once. I think was in SunOS 4.x.... In that case, the script do not specified the shell. Just a blank comment as the first line. The solution was to specify the expected shell: #!/bin/sh, in the very fisrt line. In that case was a bug. Every script must specify the interpreter for itself. From that time until now, I always use tcsh for me and the root user, without any problems. I worked with Conectiva, RH (7 to 9), SunOS and Solaris. The problem is I am not sure about this concern. I learned that root's shell is /bin/sh or /bin/bash just like you, but I never heard a strong argument for this. So, I decided to experiment to see what happens. Except for the bug above, I never had any problems. So, I go on... :-) thank you !
-- Ken Schneider unix user since 1989 linux user since 1994 SuSE user since 1998 (5.2)
On Tue, 29 Jun 2004 15:30:12 -0300
Miguel Angelo Rozsas
In a "standard" linux (Solaris, SunOS, RedHat, Fedora, Conectiva), changing the 7th (the last one) field of /etc/passwd, you change the shell. Try your self ! On SuSE, changing the shell field by a direct edit on /etc/passwd you won't change the shell ! I triple check that before post this message.... Solaris and SunOS are Unices, not Linux.
BTW: I edited my /etc/passwd file, using the vipw command, and changed
the shell from tcsh (which I had previously set with chsh) to bash,
shutdown, rebooted, and bash was still there. Then I edited /etc/passwd
with vi (not using the vipw command), changed it to tcsh and rebooted.
Upon startup, I checked the value in /etc/passwd and it was tcsh as I
expected. And, as a final time, I changed it back to bash and rebooted.
The only reason for the reboot was try to do the same thing you did. My
thoughts are possibly that suseconfig might be the culprit in your case.
Also, I think your impression of "standard" Linux is all wrong. Since
8.2, I think that SuSE has been very close to the LSB standard. One
difference between the various Unix and Linux systems is the way one
does system admin. Red Hat does it their way and SuSE does it their way
as does Burger King. Solaris does it their way, HP-UX does it
differently, Tru64 Unix is also different.
--
Jerry Feldman
participants (5)
-
Jerry Feldman
-
John Coldrick
-
Ken Schneider
-
Miguel Angelo Rozsas
-
rozsas@supernet.com.br