autoinstall/user-data/users block has no effect at all in live-server 20.04.3

Bug #1945023 reported by LittleBigBrain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity (Ubuntu)
New
Undecided
Unassigned

Bug Description

I try to use user-data/users block as following to create additional user, however this does not work at all. After installation, only testuser exists but test123 does not exist.

#cloud-config
autoinstall:
  version: 1
  apt:
    geoip: true
    preserve_sources_list: false
    primary:
    - arches: [amd64, i386]
      uri: http://es.archive.ubuntu.com/ubuntu
    - arches: [default]
      uri: http://ports.ubuntu.com/ubuntu-ports
  identity:
    hostname: ubuntuservertest
    password: "$6$X/9uRC4wZBdgIY$iRnTxZFgfYgijdk19gxOos27S6yECKD/J/n0QiJ0AGRLNRXNlGuAh04XNaYp88J99jBq/6cGEeNbUlZ7MdLMt0"
    realname: testuser
    username: testuser
  keyboard: {layout: us, toggle: null, variant: ''}
  locale: en_US.UTF-8
  network:
    ethernets:
      enp1s0:
        critical: true
        dhcp4: true
    version: 2
  ssh:
    allow-pw: true
    authorized-keys: []
    install-server: true
  storage:
    config:
    - {ptable: gpt, path: /dev/vda, wipe: superblock-recursive, preserve: false, name: '',
      grub_device: false, type: disk, id: disk-vda}
    - {device: disk-vda, size: 512M, wipe: superblock, flag: boot, number: 1,
      preserve: false, grub_device: true, type: partition, id: partition-EFI}
    - {fstype: fat32, volume: partition-EFI, preserve: false, type: format, id: EFI}
    - {device: disk-vda, size: -1, wipe: superblock, flag: '', number: 2,
      preserve: false, grub_device: false, type: partition, id: partition-root}
    - {fstype: btrfs, volume: partition-root, preserve: false, type: format, id: format-root}
    - {path: /, device: format-root, type: mount, id: mount-1}
    - {path: /boot/efi, device: EFI, type: mount, id: mount-0}
    swap: {swap: 0}
  updates: security
  reporting:
    builtin:
      type: print

  user-data:
    write_files:
    - content: |
        cloud_init_has_run
      path: /cloud_init_flag
    users:
    - default
    - name: test123
      gecos: "Foo B. Bar"
      sudo: ALL=(ALL) NOPASSWD:ALL
      groups: users, admin
      passwd: $6$H0/auQFEFQw6V$e0I16c3F7pXepdQUh0iAr.FqQzysaAc2xp.h8UTPf6UUR11qtNw87WIsoScMwiB9tAZ1oXWDjeG7o5DthpGse1

Revision history for this message
Dan Bungert (dbungert) wrote :

For now, to get the behavior you want please move testuser to user-data.
Identity is not required if you're supplying user-data.

The merge of config today isn't sophisticated enough to do something like merge the identity section user into user-data.

FWIW, the docs at https://ubuntu.com/server/docs/install/autoinstall-reference look a bit misleading and make it sound like you'd get OK results with both, but today you definitely want to send all your users through user-data.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.