Question

Root Login on SSH -- Bash Won't Run

Posted July 6, 2015 1.8k views
Linux BasicsUbuntuLinux Commands

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?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
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.

Submit an Answer