Why am I not able to change the shell with the chsh command?

Log out and log in again.

The chsh command will update the /etc/passwd file, but it does not change the current shell nor the value of the $SHELL variable in the current shell (it has no way of doing that). This is the reason you need to log in again; you have to start a new login session for a change to take effect.

Using usermod utility command worked in my case. Running on the ubuntu 18.04.

  1. First, check current value

grep nameofuser /etc/passwd

  1. change it

sudo usermod --shell /bin/bash nameofuser

  1. Verify it

grep nameofuser /etc/passwd