So you just loaded up Ubuntu Server on your Raspberry Pi 4 using the latest Ubuntu Server Pi image and when you try logging in with the default username and password of ubuntu:ubuntu, you get the error “Authentication token Manipulation error” when you try to change the default password and log in.
This occurs on a fresh image write to an SD card using the Ubuntu 18.04.4 LTS 64-bit image. This may occur on other images and other versions of Ubuntu and other versions of the Raspberry Pi.
The filename for the image with the issue is:
How to Fix
After doing some research, I found out that there was an issue with a password file or the PAM database on the image. I figured that it was best to try to log in first using the default credentials, and then we can worry about changing the password later.
To do this I decided to modify the “cloud-init” scripts. I mounted the SD-Card on another Linux system, opened the “/boot/firmware/user-data”, and changed the “expire” setting on the ubuntu user from true to false.
- Mount the SD-Card on another Linux system.
- Navigate to the boot filesystem, and then open the “user-data” file inside of the firmware directory using nano or vi. The full path on the SD-Card is:
- Scroll down to this section.
chpasswd: expire: true list: - ubuntu:ubuntu
Change the “expire: true” to “expire: false”.
- Exit the file and save.
- Properly unmount the SD-Card (using umount).
- Boot up the Pi with the Micro-SD card.
You should now be able to log in using the username ubuntu and password ubuntu without being asked to change your password, and without seeing the error.
Once you have logged in, change the password to this account by using “passwd”.
Hope it helps!