Ubuntu Reset Password Loop the new password does not take

Posted May 17, 2021 62 views
Ubuntu 18.04DigitalOcean Droplets

OK, I’m an idiot, I’ve been trying to use the web console to access my droplets, but it keeps asking for a password (running Ubuntu 18.04 with WordPress). So I hit reset password. Now, I got the new password via email.

but when I login, it asks for the reset password and then asks for a new one and then logs out. But when I log in again, it asks for the “emailed password” and keeps looping.

I’m wondering have I hit a bug. I noticed that I set this up to use ssh passwords (I have an SSH key loaded). So somewhere I read that if this happens, you automatically disallow password login via SSH. So am I stuck in the loop for that reason.

Net, net, how do I force a Droplet to stop doing this, it looks like the password has been set to aged out. And now when I try to ssh in from my machine (not the web console), it logs in properly, then asks for a new password, logs out and loops as well. Argh!!!!

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
1 answer

Hi @rich880712,

The most likely explanation is that the root’s .profile or .bashrc file contains or indirectly runs the command exit or logout. You can fix this by SSHing into your droplet with a specific command and thus bypassing Bash so that you get a chance to repair the damage;

ssh root@IP_ADDRESS_OF_YOUR_DROPLET vim .profile

will connect to your droplet and open .profile directly without invoking Bash. You can try doing the same with .bashrc.

Additionally, it’s possible you have to retype the generated password again before entering your new root password.