Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm logging into my new Ubuntu VPS via SSH from a terminal in Ubuntu desktop. I have created a new user adam, which I've added to the sudo group, so I don't have to log in as root all the time. When I login as root everything is as expected, except when I login in as adam I'm having some issues with the $BASH_VERSION environment var.

I've not changed anything within the default .profile and .bashrc files, so I should have all the default settings. I noticed though in .profile there is a condition around including .bashrc:

if [ -n "$BASH_VERSION" ]; then

Except when I echo $BASH_VERSION from the CL I get nothing back, just an empty line. Something seems really screwed here but it's just a little beyond my knowledge.

Incase it's useful, here's what I used to create the user:

useradd -d /home/adam -m adam
sudo passwd adam
usermod -a -G sudo adam
share|improve this question
up vote 2 down vote accepted

The default shell equivalent of /bin/sh on Ubuntu is /bin/dash, not /bin/bash. Check your shell.

share|improve this answer
    
Awesome! I don't quite understand why it wasn't set to the correct value to start with, but you set me on the right track. Although /bin/dash didn't work, /bin/bash did. – Adam Apr 4 '13 at 10:33
    
@adam, if this answer solved your problem please mark it as accepted. – terdon Apr 4 '13 at 10:51

I ran into the same problem. To fix it do:

sudo chsh -s /bin/bash adam
share|improve this answer
2  
Hi Balthasar. Welcome to the Stack Exchange network! The first part of your answer is correct but you were probably downvoted because the second part is unclear / incorrect; useradd -D (by itselft) simply prints the default useradd configuration. It would be best to edit your answer to improve it. – Anthony Geoghegan Jun 9 '15 at 10:33
    
Thanks, I removed that last part. – Balthasar Jun 9 '15 at 13:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .