How do you fix Chsh PAM authentication failure?

How do you fix Chsh PAM authentication failure?

  1. Use which zsh to find your zsh location. $ which zsh /usr/bin/zsh.
  2. Add /usr/bin/zsh to /etc/shells.
  3. Check in /etc/passwd that your config is /usr/bin/zsh.
  4. Run chsh -s /usr/bin/zsh.

Does Chsh need root?

fish is a smart and user-friendly command line shell for macOS, Linux, and the rest of the family. In order to let chsh accept the new fish shell, it must be added into the list of all accepted shells which requires root permission. …

How do I set zsh as default shell?

How to set ZSH as the default shell in your terminal.

  1. sudo vim ~/.bashrc.
  2. exec zsh.
  3. chsh -s $(which zsh)

Why does CHSH always ask for a 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.

How can CHSH change my shell without producting a password?

My /etc/pam.d/chsh file has this section: As the comment suggests, it lets root change the shell without needing to product the password. As such I was able to change my shell (to zsh) by running chsh as root and specifying my user account, eg:

Why does Pam not allow me to change my shell?

# # The PAM configuration file for the Shadow `chsh’ service # # This will not allow a user to change their shell unless # their current one is listed in /etc/shells.

What to do if chsh command does not work?

So that chsh command will work when you type it interactively, but not from within the installer script when invoked the way we do now. A workaround is to use a temp file instead of a pipe for the install script. This will leave stdin attached to the tty for chsh to read from, and will work without changes to the script itself.