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