[Bug 1954719] Re: Ubuntu Server 20.04.3 autoinstall - User not available until reboot

Nunya Business 1954719 at bugs.launchpad.net
Mon Jul 25 16:06:55 UTC 2022


IMO this is certainly a bug, and the comment that users are added at
first boot by cloud-init rather than "now" while correct, seems like a
poor design decision.  I agree that once the automated install is done,
the install should be complete.  There should not be any installation
tasks left to perform on the next boot.  If there are then, IMHO, the
installation isn't finished.

I have a similar situation to @Flauschie but his workaround will not
work for me.

In my particular case I am building packer images for VMWare, and those
images need to have a few users preinstalled with their SSH keys.  Since
I don't want packer to have to deal with rebooting the VM for the sole
purpose of allowing it to do first-boot installation tasks, I am forced
to just start experimenting with even more detailed "late-commands"
statements to manually add the users to the autoinstall target, and
entirely forego using the autoinstaller to add *any* users.

Simply completing the installation without requiring a "first boot"
would address both of our issues rather than requiring two different
workarounds to the same problem.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to subiquity in Ubuntu.
https://bugs.launchpad.net/bugs/1954719

Title:
  Ubuntu Server 20.04.3 autoinstall - User not available until reboot

Status in subiquity:
  New
Status in subiquity package in Ubuntu:
  Confirmed

Bug description:
  As per documentation:
   - late-commands
   -- Shell commands to run after the install has completed successfully and any updates and packages installed, just before the system reboots.

  Doesn’t seem to be the case. At least during late-commands I would
  expect the system to be finished as per description, but i.e. the
  defined user in identity isn’t even in `/target/etc/passwd` nor in
  `/etc/passwd`. Caused my late-command script to fail.

  The specified user(s) in the `identity` or `user-data` section is/are
  not applied until the final reboot happens. Therefore, late-command is
  not being run in a complete state of the install!

  How to check? Watch both passwd or group until the installer finishes.
  Nothing happens there. On reboot everything is suddenly there.

  This prevents my late-command scripts to fail, `in-target
  target=/target`, i.e. `su: user USER does not exist`.

  Manually adding users in late-command using `useradd` causes this user
  to be id 1000 and every other following counted up. Furthermore those
  users added by the installer are not being able to login then because
  their home directory belongs to `root:root`.

To manage notifications about this bug go to:
https://bugs.launchpad.net/subiquity/+bug/1954719/+subscriptions




More information about the foundations-bugs mailing list