Mar 162020
 
Picture of Raspberry Pi 4 box and Raspberry Pi 4 board below box

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:

ubuntu-18.04.4-preinstalled-server-arm64+raspi3.img.xz

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.

The Instructions

  1. Mount the SD-Card on another Linux system.
  2. 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:
    /boot/firmware/user-data
  3. Scroll down to this section.
    chpasswd:
      expire: true
      list:
      - ubuntu:ubuntu

    Change the “expire: true” to “expire: false”.
  4. Exit the file and save.
  5. Properly unmount the SD-Card (using umount).
  6. 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!

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)