root can't login — no shell!!! 

Newsgroups: comp.unix.admin
> i edited /etc/password to set the default shell for root to bash, which
> i'd downloaded in binary format from the internet.
>
> Here's the problem...I forgot to set the shell to executable, so now
> when I try to login, I get a "no shell" error and the connection is
> refused.  Similarly, when i login as a regular user and try to 'su' to
> roon, I'm rejected with the same error.

Generally you have to boot from the install media, mount the hard drive and edit the appropriate files. On a general note, it's usually a bad idea to change root's shell. The better way to go is to create another user with UID 0 (e.g. "root2") and give that user the shell you prefer.

root can't login — no shell!!! 

> :       Generally you have to boot from the install media, mount the hard
> :  drive and edit the appropriate files.  On a general note, it's
> :  usually a bad idea to change root's shell.  The better way to go is
> :  to create another user with UID 0 (e.g. "root2") and give that user
> :  the shell you prefer.
> :
> I would have to say I wouldn't agree totally with this.  There should only
> be one UID 0 user.  I suggest that users leave a standard shell on they're
> root account (i.e. csh, ksh, sh), when you login execute another shell and
> make it act as the login shell (exec bash --login [on freebsd]).  Some other
> systems such as linux provide the oppertunity to specify the shell to use
> when su'ing.  For example on my RedHat6.2 box (su - --shell=/bin/zsh).
> Generally the root shell shouldn't be changed but if you have to avoid doing
> it with any editor such as vipw because that lead to human errors (ie a
> trailing '/' charater in the home directory feild).
>
>         Basically, leave the root shell as it is, only have one UID 0 user
> and when you wish to use another sheel as root then make it act as a login
> shell as shown above.

Agreed. Creating a second user with UID 0 just adds another root password.

Definitely it is preferable to just run the shell you prefer after you log in as root. It's such a tiny effort to do so that it mystifies me why anyone would mess with the root shell.

Jefferson Ogata