group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #08959
[Bug 1619393] Re: cloud-init useradd/groupadd fails on ubuntu-core-16 with readonly /etc/passwd
** Also affects: cloud-init (Ubuntu Xenial)
Importance: Undecided
Status: New
** Changed in: cloud-init (Ubuntu Xenial)
Importance: Undecided => Medium
** Changed in: cloud-init (Ubuntu Xenial)
Status: New => Confirmed
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1619393
Title:
cloud-init useradd/groupadd fails on ubuntu-core-16 with readonly
/etc/passwd
Status in cloud-init:
Fix Committed
Status in cloud-init package in Ubuntu:
Fix Released
Status in cloud-init source package in Xenial:
Confirmed
Bug description:
=== Begin SRU Template ===
[Impact]
When running under ubuntu-core 16 images, /etc/passwd is read-only.
If my user-data includes any non-default username, creation fails due to
the read-only nature of the image.
This is addressed by useradd/groupadd including a command line flag, --extrausers
which instructs the command to look for a different user/group database in
/var/lib/extrausers , which is writable in the ubuntu-core 16 image.
[Test Case]
In a snappy image that has cloud-init enabled, launch image with the
following user-data:
#cloud-config
users:
- name: bob
snapuser: bob@xxxxxxxxx
And also:
#cloud-config
snappy:
email: bob@xxxxxxxxx
where 'bob@xxxxxxxxx' is your launchpad registered email address.
Assume you can log in.
[Regression Potential]
The code is intended to be backwards compatible and inert unless
cloud-config provided turns it on. It is also gated by a 'system_is_snappy'
method that checks if the system is snappy (ubuntu core).
Unit tests are provided, so regression should be somewhat reduced.
Some code was moved around to implement this, and a new config module
was added.
[Other Info]
The upstream change made here is at [1]
[1] https://git.launchpad.net/cloud-
init/commit?id=d8534561ba76db25b6fc0044eb1bfda63686e859
=== End SRU Template ===
When running under ubuntu-core 16 images, /etc/passwd is read-only.
If my user-data includes any non-default username, creation fails due to
the read-only nature of the image.
This is addressed by useradd/groupadd including a command line flag, --extrausers
which instructs the command to look for a different user/group database in
/var/lib/extrausers , which is writable in the ubuntu-core 16 image.
The cc_user_groups module though is not aware of this.
The Distro base-class could check if the system it's running on is snappy (see cc_snappy.py)
and if so, append the --extrausers parameter to the useradd/groupadd commands.
1) release is Xenial (ubuntu-core 16)
2) cloud-init present is: 0.7.7~bzr1256-0ubuntu1~16.04.1
3) useradd bob -m should create the user bob
4) useradd fails due to readonly /etc/{passwd,group,shadow}
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1619393/+subscriptions