Can't change default root password.

Posted February 19, 2017 10.3k views
Getting StartedUbuntu 16.04

I try to change the default root password on my new droplet but when i hit enter with the new password, it just resets the console and the default password doesn’t change.

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
10 answers

It asks for the current password first.

I do enter the current password. When it asks for a new password I enter one. When I press enter, it goes right back to asking for the username/password. The new password doesn’t work at this point.

I have the same problem. I log in successfully, it asks to enter a new password. After I enter a new one it goes back to the start asking me to log in

You can try removing the encrypted password in the /etc/shadow file which will result in no password for the root account.

Now try to set a new password. I think that should work.

Let me know if it helps.

  • I am having same issue, i use “reset root password” and get new password from email, and i cant not login anymore (console reset after retype new password, after reset i type default pass from email, console loop again and reset again)

Woet was right however it never clicked what I was doing wrong. Thanks again.

I have the same problem, somebody know how to fix it please?

Hello, all

If you have access to your droplet and you want to change the password, just make sure you’re logged as the root username and then type the following command:


You will then be prompted to enter the new password and then re-enter it again.

If you’re unable to access your droplet you can try to reset the root password and then check your email and access the droplet via the web console.

You can reset your root password your account. Navigate to the control panel. From the project the Droplet is in, or from the main navigation’s Droplets page, locate the Droplet. Click the Droplet’s name to open its detail page, then select Access in the left navigation.

Click Reset Root Password to reset the Droplet’s password. You will receive an email containing the Droplet’s temporary password.

Note: Some operating systems use internally-managed passwords, which means you cannot reset the root password from the control panel. In these cases, you’ll see the following message in the Reset root password section:

Once you have received your new password you can either ssh to the droplet using your ssh client or access the droplet using the DigitalOcean console:

Log In with the Console

From the DigitalOcean Control Panel, first click the name of the Droplet you want to access, then select Access from the left navigation. Click the Launch Console button to open a web-based console session.

When the console opens, click the console screen and press ENTER to ensure that the login prompt has focus. At the login prompt, enter the user you want to log in as. This is typically the root user or a user configured with sudo privileges.

When prompted, enter the password associated with the account. For security purposes, your password will not be displayed on the screen as you type or paste it into the command line.

Once you’ve entered the password, press ENTER. If this is the first time you’ve logged in after resetting the root password through the control panel, you are prompted to enter the password again, then asked to choose a new password.

Once you’ve successfully entered your credentials you should be logged in to your Droplet.

Hope that helps!

In my case, the problem was a full disk. I had to chroot to the file system before I could see the error happening, which was authentication token manipulation error. I cleared out the excess journal files and all was well.