Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-12-2007, 04:17 PM   #1
Registered: Aug 2005
Location: Slovenia
Distribution: Fedora, Ubuntu
Posts: 69

Rep: Reputation: 15
userad and /bin/sh problem


I installed Ubuntu 7.04 Server edition. Everything is ok, I created one user account during instalation as Ubuntu have root user disabled by default! Now I want to add some users. I added a user with

sudo useradd -m some_user
passwd some_user
I checked the /home/some_user directory and files were copied from the /etc/skel directory.

Now I can login to my new user account but nothing of the following works (and maybe more):
- command completion (TAB); instead of command completion I get real tab space
- command history (up/down keys); now my cursor goes up and down the screen

All this things works on my primary account that was created during install. Why? I checked and the owner of every .bash* file is some_user. It seems as .bash* files are not read or there is something else?

Best regards,
Old 06-12-2007, 04:22 PM   #2
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Is your shell /bin/sh or /bin/bash? If its /bin/sh then you probably won't have the fancy features like tab completion and history.
Old 06-12-2007, 04:37 PM   #3
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
Look at the /etc/passwd file for the user.
The last field represents the shell to spawn for that user ... like Reddazz mentioned ... you probably want /bin/bash.

The -s switch for useradd specifies the shell.

See the man page.
Old 06-12-2007, 04:52 PM   #4
Registered: Aug 2005
Location: Slovenia
Distribution: Fedora, Ubuntu
Posts: 69

Original Poster
Rep: Reputation: 15
Thank you both very much! You were right. I checked the /etc/passwd and some_user had /bin/sh instead of /bin/bash as its shell.

I used command

sudo usermod -s /bin/bash some_user
and now everything works ok! Fist of all I didn't know which of the shells enables tab completion and all those fancy features. Then I checked the defaults for useradd with

useradd -D
and I saw that the default for SHELL=/bin/sh. This default behavior can be changed with command

sudo useradd -D -s /bin/bash
More on this topic can be found on or man pages.

Best regards,

Last edited by Rostfrei; 06-12-2007 at 04:55 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo /usr/bin/chroot /home/chroot /bin/su - xxx| /bin/su: user xxx does not exist saavik Linux - General 3 07-04-2007 10:30 AM
Installing .bin-files, leave the file in /usr/local/bin/ ? lagu2653 Linux - Software 1 11-08-2005 08:30 PM
Is '/usr/bin/find' reliable if '/bin/ls' has been replaced? DigaMe Linux - Security 2 11-12-2004 10:42 PM
bin/bash:usr/bin/lpr NO SUCH FILE OR DIRECTORY Adibe_Hamm Linux - Newbie 3 10-14-2003 02:30 AM
Newbie needs help Installing j2sdk-1_4_2-nb_3_5_1-bin-linux.bin bendoku Linux - Newbie 5 10-11-2003 09:27 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration