Why does my console access log out after logging in?

Posted May 13, 2016 4.5k views

When I try logging in to the console after using a new root password, I’m logged out again immediately. Why does this happen?

I’m able to reset the password in the control panel, and can log in to reset it. Once it’s changed, I just get this loop where I briefly see the Ubuntu login header before being logged out:


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.

Submit an Answer
3 answers

The most likely explanation is that root’s .profile or .bashrc file contains or indirectly runs the command exit or logout. You can fix this by SSHing in to your droplet with a specific command and thus bypassing Bash so that you get a chance to repair the damage; e.g., ssh root@IP_ADDRESS_OF_YOUR_DROPLET vim .profile will connect to your droplet and open .profile directly without invoking Bash.

Did you find a solution?

I have the same issue.
The technical centre has been unable to help me out so far unfortunately.