[Bug 1954719] Re: Ubuntu Server 20.04.3 autoinstall - User not available until reboot
Siegfried
1954719 at bugs.launchpad.net
Tue Jan 16 15:31:57 UTC 2024
In my usecase, I want to install a machine with a single user and change their shell to zsh. The relevant part of my user-data.yml looks like this:
autoinstall:
identity:
hostname: UbuntuLatest
password: <hashed>
username: test
late-commands:
- echo "<mounting the nfs and cifs shares>" >> /target/etc/fstab
- # and other things to prepare the system like configuring gnome etc.
user-data:
runcmd:
- sed -i 's#/bin/bash#/usr/bin/zsh#g' /etc/passwd
I create the user in the identity section and prepare the system in the
late-commands section just as described in the docs:
ubuntu.com/server/docs/install/autoinstall-reference
But the user does not exist, so I cannot change the shell accordingly, I
have to add a line in the poorly documented user-data section. The
splitting of the system preparations into two different sections makes
this error prone. So I agree that this is a bug.
--
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