Root Login on SSH -- Bash Won't Run

July 6, 2015 521 views
Linux Commands Linux Basics Ubuntu

I noticed the strangest problem when I used the Ubuntu 14.04 LAMP Stack droplet builder to create a new droplet. When I login as root (without a key file), I get a shell that sort of acts like Bash, but doesn't run the typical /root/.bash* stuff. I noticed that when I typed alias, nothing was there like on other hosting plans, and when I typed ls, the directories weren't colorized. However, then I typed /bin/bash, and all was well again. When I type chsh, I see it's set to /bin/bash, and the same thing when I grep root from /etc/passwd.

Why do I have to type /bin/bash after login on this hosting plan, but not when I was on Amazon hosting?

2 Answers

This is quite strange. I just created a new LAMP droplet using this image, without an ssh key and was not able to duplicate this issue. I would recommend re-creating your droplet and if you continue to see this, please open a ticket with our support team so we can investigate further.

Change the setting in the /etc/passwd file directly. chsh reported /bin/bash/ and was run as sudo, but failed to actually set it. I changed setting manually in file and it works as expected.

Have another answer? Share your knowledge.