Setting up the same bashrc behavior as root ?

February 21, 2014 1.9k views
Hello. When I connect to my root account on DigitalOcean with ssh, everything goes super: I got a colored prompt, up-arrow for history, auto-completion, the works. I created a new user with useradd -d /home/myuser, and when I login with that user, I have nothing of the kind: the shell works but my up-arrow does ^[[A, I have no no color and no auto-completion. My local .bashrc is similar to the root account's .bashrc but was created automatically (it also created .bash_logout, .cache, .profile, .viminfo). How can I create decent behaviors for my user accounts ?
4 Answers
Edit /etc/passwd and change the line that has your account name from /bin/sh to /bin/bash.
When creating new users those "skeleton" files are copied over from
If you would like to give it a try you can copy the skeleton files from root account over to the new user. If you would like these to be applied to new users you can copy them from root to
. Just do a backup of the files first not to overwrite them.
What @Tyler suggest is correct I overlooked when you mentioned up arrow gives you the characters.
Solved. Thank you very much to both of you.
Have another answer? Share your knowledge.