passwd: Authentication token manipulation error when setting new ubuntu account password for the first time

I have a fresh install of Ubuntu Server 18.04 which is deployed headless on my home network and I use SSH to access it. On first login, I’m prompted to change the ubuntu account’s password to another one (as standard), however before I can even confirm the new password my SSH session is closed due to the error in the title, and the password remains unchanged.

I’m running Ubuntu on a Raspberry Pi 3, and I installed the image using Rufus to my MicroSD card. I’ve read that this can be due to the card being stuck in read-only mode. However, I can’t enter any other commands and I’m forced to change the password. I’ve tried reinstalling the image several times and even checked with 2 passes to ensure there are no read or write issues with the MicroSD card.

What would be my course of action to fix this? I don’t know of a way to circumvent changing the password first time, and it would be a pain to connect my physical device to peripherals and do it in person, so I’d rather access my Server in person as a last resort.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


This could be caused by quite a few things. Here’s great article on a few things that you could try in order to solve the problem:

Let me know how it goes! Bobby