[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: login problems on change of default shell



2014-10-05 19:42 keltezéssel, John Aten írta:

> I just built bash 4.3.29 from source. I wanted to change my root and one user account to use it as the default shell. I ran sudo chsh and entered /usr/local/bin/bash, and everything was fine. I could log in and out, run commands, and the $SHELL and $BASH_VERSION environment variables confirmed the change. 
> 
> Things got hinky, though when I tried to change my regular, non-root user account. While logged in as my regular user, I entered chsh, but when I typed in the path, it says that I had entered an invalid shell. I tried sudo chsh, and the same. I was perplexed by this, as it seemed perfectly valid when I ran it as this user by typing the path into the command line of the previous default shell. Commands run normally, and $BASH_VERSION returns the right number. I tried to change my regular user's shell again and got the same error. I triple checked the path, and tried again, this time while logged in as root. It then returned:
> 
> chsh: PAM: Authentication failure
> 
> I logged in as root and changed the shell for my regular user account in /etc/passwd, but after this I couldn't log in to my regular user account at all. At first it gave me a 'login incorrect' error, but on repeated attempts it would give what looks like a 10 or 15 line message, but the screen clears so quickly I can't read it. I logged in as root and changed my regular user's default shell back to the previous /bin/bash, and now it works fine.
> 
> Any thoughts?

from man chsh:
"The only restriction placed on the login shell is that the command name
must be listed in /etc/shells, unless the invoker is the superuser, and
then any value may be added."

So put /usr/local/bin/bash into /etc/shells

Hope, this helps.

-- 
--- Friczy ---
'Death is not a bug, it's a feature'


Reply to: