Cloud-init example doesn't create a usable account

Asked by Mies van der Lippe

I'm trying to set up Ubuntu Server 20.04. For this, I'm using the provided Cloud-Init installer, using an image mounted to a VM in which I put the user-data and meta-data files. These are parsed and read correctly. I can use the early-command for example, and if I make a mistake, the config doesn't work and it tells me.

Now my problem is the following;
In the given documentation at https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ there's nothing about what type of crypted password is required. I used the following settings I found online:

# echo possible | mkpasswd -m sha-512 -s
$6$nqZiIASVBA.iF$9nubU0ImWVrv4XhtEq9XhSh9UYNFQ7yC9Lf7A.uheSlJ3cgI5d9ltkUwRq.X8lAwoQuLAMem6v.gJNGYwk5XA0

I've tried putting this salt + hash in quotes and not in quotes. Neither results in me being able to log in. I've also tried defining a more classical users block Cloud Init sometimes uses. This didn't work either.

So then I started wondering if it'd ever work at all and I tried just putting the example config in there;
https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/QuickStart
This also didn't work. It installs just fine, can't log in.

I'm really starting to wonder if it works at all. I'd really like to see a config that's proven to work on the release build (which updates during the install it seems).

My problem partially exists of having no way to know whether it even puts my password in the right places.

Edit:

I've mounted the vdi. I'm absolutely shocked to find out what's in my /etc/passwd and /etc/shadow files;

/etc/shadow
kim:!e17SeNZhj9a9Q:18388:0:99999:7:::
ubuntu:!:18388:0:99999:7:::

/etc/passwd
kim:x:1000:1000::/home/kim:/bin/sh
ubuntu:x:1001:1002:Ubuntu:/home/ubuntu:/bin/bash

Kim is created by adding the cloud-init users section (this run I tried using a DES encrypted pass, also doesn't work). The Ubuntu user is created by copying the example from the quickstart config.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.