Score:0

Wrong Shell for user and $SHELL value

cn flag

The default shell of my user somehow changed to /bin/sh even though it's set in /etc/passwd to /bin/bash.

I can't seem to be able to change it to any other value, I mean I can change it but the set value is not taken into account.

Changing it with chsh makes no difference.

$ echo $BASH $SHELL
/bin/sh
$ grep user /etc/passwd
user:x:1000:1000:User,,,:/home/user:/bin/bash
$ chsh
Password: 
Changing the login shell for user
Enter the new value, or press ENTER for the default
    Login Shell [/bin/bash]: /bin/bash
$ echo $BASH $SHELL
/bin/sh
$ su root
Password: 
root@elitebook1:/home/user# echo $BASH $SHELL
/usr/bin/bash /bin/bash
root@elitebook1:/home/user# 
Kulfy avatar
mz flag
You need to logout and login again to see changes. Can you please confirm if the issue persists after re-logging in?
WestMD avatar
cn flag
I just rebooted and now the correct shell is used. Thanks
Kulfy avatar
mz flag
The reboot essentially logged you out :)
Score:0
cn flag

Apparently logging out was necessary for the change to be taken into account. Issue solved!

ThunderBird avatar
ru flag
Just logging out... nothing more or less!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.