Unix – new user strange shell

shellbanner

I faced this issue when i tried to create a new user on Ubuntu server, new user was given the Bourne shell rather than the Bash shell, this is a basic shell located in /bin/sh, and it looks boring, you won’t be able to use auto-completion with such shell. in this article, i will show you how to change default shell of an unix user.

Normally, ย you create a new user using this command:

$ useradd username

that user will have no command autocompletion and no current directory shown before the command prompt. The user’s shell can be changed using:

$ chsh -s /bin/bash username

To change the default shell, look in

$ /etc/defaults/useradd

and there is a SHELL directive in there that can be changed to

$ SHELL=/bin/bash

Cheer!!

Leave a Comment