PDA

View Full Version : [ubuntu] bug of login ubuntu server 10.10 via SSH



webappl
November 4th, 2010, 12:28 AM
Hi guys,

I encountered a bug when remote logging in ubuntu with a new user account via SSH. After connected, the command prompt was displayed as '$' without quotation marks. As we know, the correct form should be like 'user@machine:~#'. There were also quite a lot of abnormal behaviors, eg, 'source' command didn't work, and up arrow won't recall history but printed gibberish. However, after type in 'bash', the prompt became 'user@machine:~' and the machine seemed normal.

This happened with every new user created by 'useradd' command. However, when logging in with the user created during installation of Ubuntu, the machine is working normally.

Does anybody know what causes this bug? How can I fix it?

Thanks in advance.

Alex

TSJason
November 4th, 2010, 03:27 AM
Alex,

Your new user has the default shell set to /bin/sh, but you want it to be set to /bin/bash. To change the user(s) shell just use the chsh command:


sudo chsh username -s /bin/bash

webappl
November 5th, 2010, 12:06 AM
Alex,

Your new user has the default shell set to /bin/sh, but you want it to be set to /bin/bash. To change the user(s) shell just use the chsh command:


sudo chsh username -s /bin/bash

Thanks. Problem solved.