Tuesday, April 23, 2024
75
rated 0 times [  75] [ 0]  / answers: 1 / hits: 63515  / 3 Years ago, fri, september 17, 2021, 9:40:49

Today I tried to switch to another shell.



First I tried fish, and used chsh -s fish to change fish to default. After some time I found it cannot use ~/.bashrc (&& needs to be replaced by and).



Because I prefer to reusing ~/.bashrc, I found zsh which seems an easier one and followed this documentation to switch to zsh.



While I was running sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)", suddenly it asked me to enter Password:. I entered the root password but got PAM: Authentication failure.



Then I tried chsh -s bash and chsh -s zsh, it always asked me for a password and threw PAM: Authentication failure (not system password). I can't figure this out.


More From » command-line

 Answers
1

Thanks to this question on Server Fault, I worked around this by:


Replacing


auth       required   pam_shells.so

with


auth       sufficient   pam_shells.so

in /etc/pam.d/chsh.


Then it doesn't ask for a password anymore.
But I think it better to restore chsh settings after switching the shell.


[#14102] Sunday, September 19, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ingwhin

Total Points: 332
Total Questions: 112
Total Answers: 115

Location: Burkina Faso
Member since Tue, Apr 26, 2022
2 Years ago
;