Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Misbehaving console
PostPosted: Mon May 10, 2010 3:08 am 
Offline
Newbie

Joined: Mon May 10, 2010 3:00 am
Posts: 4
Hi,

I've created a new user on my node using the following commands:

Code:
useradd -d /home/newuser -m newuser
passwd newuser


When I now log into my node with this new user using ssh I get a real clunky console. No syntax highlighting, when I press tab it actually tabs instead finding the closed resemblance, the up key for the previous command doesn't work (prints ^[[A). My prompt looks like this "$".

I've checked, and there is a .bashrc in the newly created home folder with a whole bunch of stuff in it.

Is there anyway I can fix my console to be a bit more helpful?

thanks,
Luke


Top
   
 Post subject:
PostPosted: Mon May 10, 2010 3:18 am 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
Just to verify, "using ssh" as in ssh youruser@yournode, not through the LISH's ssh access via ssh linodeXXXXX@cityXX.linode.com ?

If so, it's most probably either wrong terminal type reported by your SSH client (what is it, btw?), or missing termcap/terminfo database. Well, that or the user's login shell is "true" sh, ash, dash, or other super-primitive shell that does not support line editing.
Try in order:
Code:
TERM=vt100
export TERM

and checking if line editor works now
- executing "bash" and checking if line editor works there (you may need to install it, tho it's a low chance)
- verifying that ncurses, ncurses-base and ncurses-term (or their equivalents on non-Debian; if you have a package described as "terminfo" or "terminfo database" you'll need it too) are installed.


Top
   
 Post subject:
PostPosted: Mon May 10, 2010 3:28 am 
Offline
Newbie

Joined: Mon May 10, 2010 3:00 am
Posts: 4
OK, sorry, I'll add some missing information.

My node is Ubuntu Hardy.
My desktop is Ubuntu Karmic.

When I use ssh (not LISH) with root@mynode it all work fine but with newuser@mynode it looks like, as you said, a very primitive shell.


Top
   
 Post subject:
PostPosted: Mon May 10, 2010 7:23 am 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
Then run chsh as that user, or chsh <user> as root, and set it to /bin/bash (or your preferred other shell, if installed).
See, useradd sets the shell to /bin/sh unless specified, and /bin/sh is usually a symlink to the barebones dash, so you gain a few milliseconds per script startup time (and believe me, on a 200 MHz CPU you can see the difference).
On Debian you're supposed to use adduser instead of useradd; there's quite a chance that on Ubuntu too. If not, remember to put -s /bin/bash on your useradd command line next time.


Top
   
 Post subject:
PostPosted: Mon May 10, 2010 7:11 pm 
Offline
Newbie

Joined: Mon May 10, 2010 3:00 am
Posts: 4
Ah, you see. I knew there had to be a difference between useradd and adduser. At least now I found one of them. Thanks!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group