I tried to change root's shell with chsh command, but now I get an error when I try to connect as root with sudo -i.
$ sudo -i
sudo: /usr/bin/bash: command not found
What do I have to modify to get the bash shell?
I tried to change root's shell with chsh command, but now I get an error when I try to connect as root with sudo -i.
$ sudo -i
sudo: /usr/bin/bash: command not found
What do I have to modify to get the bash shell?
Assuming that you have not modified the path or created symlink, the default path to the bash binary is /bin/bash, not /usr/bin/bash.
The error is occurring because you have set the root's shell as /usr/bin/bash in /etc/passwd like:
root:x:0:0:root:/root:/usr/bin/bash
You need to change that to /bin/bash:
sudo usermod -s /bin/bash root
or do:
sudo vipw
and make the modifications manually.
You can obviously choose any other shell of your choice, just make sure that the path is correct. A common place to look for shell paths is /etc/shells file which contains the full paths to all the valid login shells on the system.