TurnKey Linux Virtual Appliance Library

Shell Works Great as Root

mike_8's picture

Bash works great as root.  Just as I'd expect.  However, with my created non-root user it acts badly.  Can't do basic stuff like tab to complete file names or even delete characters correctly.

Works totally fine as root though.  Any ideas?

Jeremy Davis's picture

Sounds like the profile files not copying across

The root user has some hidden files in the home directory which set this stuff up. Generally they are copied across automatically when a new user acount is created. But I suspect that they didn't in this case. How did you set up the new user?

Mike Gifford's picture

I'd used the skel code which

I'd used the skel code which I'd used in the past with different distros. 

$ ls -la /etc/skel/
total 24
drwxr-xr-x   3 root root 4096 Jan  9 02:31 .
drwxr-xr-x 111 root root 4096 Jan  7 18:35 ..
-rw-r--r--   1 root root  220 Apr 19  2010 .bash_logout
-rw-r--r--   1 root root 2924 Dec 20  2010 .bashrc
drwxr-xr-x   2 root root 4096 Dec 20  2010 .bashrc.d
-rw-r--r--   1 root root  675 Apr 19  2010 .profile


Replacing these files with the ones from root is making it work better.

Jeremy Davis's picture

AFAIK useradd uses files from /etc/skel by default

So perhaps we want the TKL devs to copy the ones found in root to be added to /etc/skel?

What do you think about that? If you agree that that would be the ideal situation then either register a blueprint, or just post back and I'll register it.

Mike Gifford's picture

That sounds right

Please register the blueprint & then point me to it. I'm curious to see where that's being done.

Jeremy Davis's picture

Done :)

Blueprints are on LaunchPad. Here is the one I just registered.

Alon Swartz's picture

Can't reproduce

I tried reproducing the issue but couldn't, everything seems OK (see below). How did you add the new user?

BTW, this should be registered as a bug in launchpad, not a blueprint. IIRC, there was an option to convert a blueprint into a bug on LP, but I can't find it, @Jeremy any ideas?

root@core # adduser testuser1
Adding user `testuser1' ...
Adding new group `testuser1' (1002) ...
Adding new user `testuser1' (1001) with group `testuser1' ...
Creating home directory `/home/testuser1' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for testuser1
Enter the new value, or press ENTER for the default
        Full Name []:
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [Y/n] y

root@core /# su testuser1
testuser1@core /$ cd ~
testuser1@core ~$ find .

testuser1@core ~$ find /etc/skel/

testuser1@core ~$ diff /etc/skel/.bashrc /home/testuser1/.bashrc

Jeremy Davis's picture

Sorry Alon I didn't actually test

And I guess I considered it more of a feature request rather than an actual bug...

I had a look and I can't see how to change it either. I did a quick google and could only find a blueprint where it was suggested that launchpad should be able to do that but it says that it has been 'completed' (although to be fair it is suggesting the other way around, not both ways ie bug to blueprint).

Alon Swartz's picture


Hmmm... maybe it was converting a question to a bug. No worries...

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)