[Bug 1881588] Re: pre-seeding lxd on Core appliances breaks console-conf user creation
Stéphane Graber
1881588 at bugs.launchpad.net
Fri Jul 3 03:15:35 UTC 2020
Yeah, the new logic should work fine.
An alternative for the older logic would be to skip uid < 1000 so we
ignore system users.
Applying something like this worked here:
--- /usr/share/subiquity/console_conf/controllers/identity.py 2018-08-07 15:07:53.000000000 +0000
+++ identity.py 2020-07-03 03:12:47.405925882 +0000
@@ -58,9 +58,13 @@ def get_device_owner():
except FileNotFoundError:
return None
with extrausers_fp:
- passwd_line = extrausers_fp.readline()
- if passwd_line and len(passwd_line) > 0:
- passwd = passwd_line.split(':')
+ for line in extrausers_fp:
+ line = line.strip()
+ if not line:
+ continue
+ passwd = line.split(':')
+ if int(passwd[2]) < 1000:
+ continue
result = {
'realname': passwd[4].split(',')[0],
'username': passwd[0],
--
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/1881588
Title:
pre-seeding lxd on Core appliances breaks console-conf user creation
Status in snapd:
Invalid
Status in subiquity:
In Progress
Status in subiquity package in Ubuntu:
Invalid
Status in subiquity source package in Xenial:
Confirmed
Status in subiquity source package in Bionic:
Confirmed
Bug description:
when seeding appliance images with lxd, user creation gets impossible.
console-conf skips the user creation, system-user assertions do not
work either because there is already a user exisiting in the image.
the tty screen shows instructions to log in with "lxd@<IP ADDRESS>"
...
since the lxd user is a special case hack in Ubuntu Core images, "snap
create-user ..." should probably learn to ignore its existence ...
To manage notifications about this bug go to:
https://bugs.launchpad.net/snapd/+bug/1881588/+subscriptions
More information about the foundations-bugs
mailing list