Changing default shell for a non-root user on your Linux server without being asked for a password
/usr/bin/chsh -s $(which zsh), chsh asked for a password, but there’s no password for my current user. If running this using sudo,
root’s default shell gets changed.
Simple & fast solution: add the following line to the top of
auth sufficient pam_shells.so
auth required pam_shells.so, change
(I personally suggest to revert the changes to
/etc/pam.d/chsh after you finished changing the shell)