}

chsh error PAM: Authentication failure

Created:

One possible solution to this problem is to add the new shell to /etc/shells file. If the shell exisits in the /etc/shells, then change the contents of the file /etc/pam.d/chsh from

auth       required   pam_shells.so

to

auth       sufficient   pam_shells.so

You could try to create a group for users that can change their shell.

groupadd chsh
usermod -a -G chsh username
# Only users of group chsh can change their shells without a password.
auth       sufficient   pam_wheel.so trust group=chsh