Problem by changing the rootshell

danger@ said:
when your system breaks (e.g. /usr/ won't be available), you will not be able to log in...

Actually, in Single User Mode you are prompted to enter the path to a valid shell, so you can always type /bin/sh there...
 
Ishildur said:
Hello
I've been trying to change the rootshell by adjusting the file /etc/passwd as following:

I want to chime in here. Changing root's shell is a bad idea. Plain and simple. Let's say it again.

Changing root's shell is a bad idea.

If it really really annoys you to have to use csh versus sh, just do an exec /path/to/preferred/shell as your first command when you login as root.
 
Better yet, don't login as root. Use sudo.

Use su - -c /path/to/shell if you really must login as root and use a different shell.

Or, configure/enable the toor user. That's what it's there for (a second "root"/UID 0 account with a different shell).
 
gordon@ said:
I want to chime in here. Changing root's shell is a bad idea. Plain and simple. Let's say it again.

Changing root's shell is a bad idea.

If it really really annoys you to have to use csh versus sh, just do an exec /path/to/preferred/shell as your first command when you login as root.

Less dogma please. Having csh as root's shell has been a bad idea for ages, yet no one does anything about that. If you know the pitfalls of changing a root shell, you can easily work around them (WITH_STATIC_$SHELL=yes, PREFIX=/). It is also trivial to change root's shell back to csh for the purpose of bugreporting or checking if your shell causes the error with your foo program.

Let's hear some real arguments why changing root shell is a bad idea, and let's assume that the prefered shell is located on / partition and statically linked. Like: what in base system assumes root shell is csh?
 
phoenix_rizzen said:
Better yet, don't login as root. Use sudo.

Use su - -c /path/to/shell if you really must login as root and use a different shell.

Or, configure/enable the toor user. That's what it's there for (a second "root"/UID 0 account with a different shell).

Strange, in /etc/passwd they call him the "Bourne again Superuser".
No idea what this has to do with bash or it's creator.

I tried in xterm/bash:
su - -c /bin/csh
su: only root may use -c

according to the su manpage the -c option is for root to
start a shell with specific user or group permissions.
But if you are already root why not just type csh to get your shell?
 
blame the cat

Mel_Flynn said:
Less dogma please.
It's the only thing seperating us from the catma?

In any case, the best reason is that when I ask why I cannot log-in as root any more (some 5 months from now) I can clearly say:
lvl5 Cellar Troll (6d3 +10 gas damage per round) said:
"It's not my fault, I did not change root's shell!"
 
MG said:
Strange, in /etc/passwd they call him the "Bourne again Superuser".
No idea what this has to do with bash or it's creator.

Originally, way back in the annals of history, toor was created to allow people to use a UID 0 account with bash set as the default shell. Hence the name set in /etc/passwd.
 
fronclynne said:
It's the only thing seperating us from the catma?
No, it allows us to create informed decisions. The reason I change root shell is that I know more about the ksh and bash shell then the csh shell and that makes me more productive in the cases I need to log in and root and fix problems.
I could probably shape csh's behavior to be as productive as bash/ksh, but since no one gives any real answer as to why root's shell should be unchanged, these changes might as well cause the breakage of the mystical system that requires root's shell to be csh.
 
Mel_Flynn said:
... since no one gives any real answer as to why root's shell should be unchanged, these changes might as well cause the breakage of the mystical system that requires root's shell to be csh.

Well, you changed the rules a bit by assuming that the shell of choice is statically linked and on the / filesystem. Most folks don't go to that effort.
 
Back
Top