25

I just created a new user on my system using useradd -d /home/users/john -m john (Using Ubuntu 11.04). This worked fine, but when I changed to john, my bash is not fully functional. That is, it has no autocomplete, I can not use they arrow keys (e.g. UP to get the last command), and instead of showing my current directory it only shows $. I loaded a .bashrc but this appears to be completely ignored. What could cause this?

PD: this user is already working on the system and I rather not remove it and add it again, if possible.

2 Answers2

55

Probably john's shell is not /bin/bash, but /bin/sh. On Ubuntu, that's a shell intended to execute scripts fast, with no fancy interactive features such as command line edition. Check last column of grep john /etc/passwd or getent passwd john. You might want to run chsh -s /bin/bash john to change user's shell.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
rvs
  • 1,633
  • 13
  • 13
6

you can jump between shells by typing the name of the shell

$ bash

and in the next line you will get this following prompt

user@hostname$ 

which is the bash shell. Your up arrow key and autocomplete will work now

Saad
  • 169
  • 1
  • 2
  • 1
    It should be noted that is obviously temporary. The currently accepted answer has a more permanent solution. – jw013 Nov 07 '12 at 14:30
  • ok I didnt know that, thanks for that I will save the accepted answer for future reference – Saad Nov 08 '12 at 06:28