Recently I've gotten Cloud-Init to work by mounting my config in an image. This is all fine, it works. If I break the config, it tells me. What it doesn't tell me is why I'm not allowed to log on.
What I've tried is creating my own password using echo possible | mkpasswd -m sha-512 -s
and by copying the example found on the quickstart page: https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/QuickStart
Neither work. I've tried setting a custom username too. Doesn't change anything. The default ubuntu:ubuntu
is also unavailable. Neither is ubuntu and blank.
What I'm using:
https://releases.ubuntu.com/20.04/ubuntu-20.04-live-server-amd64.iso
https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/QuickStart
# echo possible | mkpasswd -m sha-512 -s
$6$nqZiIASVBA.iF$9nubU0ImWVrv4XhtEq9XhSh9UYNFQ7yC9Lf7A.uheSlJ3cgI5d9ltkUwRq.X8lAwoQuLAMem6v.gJNGYwk5XA0
The following config with it's supplied password, or the above;
#cloud-config
autoinstall:
version: 1
identity:
hostname: ubuntu-server
password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"
username: ubuntu
I've also tried setting up a users block like this:
What I'm asking for:
- A better documentation of what type of hash is expected.
- A working user-data config
users
section also works if put underautoinstall/user-data
. – Barchan