From chshthe chsh manual:
When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in /etc/shells
/etc/shells.
So you needcan either to run chsh as root (sudo chsh -s /usr/local/bin/bash user), either to as root
sudo chsh -s /usr/local/bin/bash "$USER"
or add /usr/local/bin/bash to /etc/shells (sudo echo /usr/local/bin/bash >>/etc/shells). to make it a "standard shell"
echo /usr/local/bin/bash | sudo tee -a /etc/shells
chsh -s /usr/local/bin/bash
But noteNote that the fact that which bash still points to /bin/bash does not mean your shell has not been changed, it just means /bin is before /usr/local/bin in your PATH$PATH.