← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1619393] Re: cloud-init useradd/groupadd fails on ubuntu-core-16 with readonly /etc/passwd

 

This bug was fixed in the package cloud-init - 0.7.8-27-g29348af-
0ubuntu1

---------------
cloud-init (0.7.8-27-g29348af-0ubuntu1) zesty; urgency=medium

  * debian/cloud-init.templates: enable DigitalOcean by default [Ben Howard]
  * New upstream snapshot.
    - disk-config: udev settle after partitioning in gpt format. (LP: #1626243)
    - unittests: do not read system /etc/cloud/cloud.cfg.d (LP: #1635350)
    - Add documentation for logging features. [Wesley Wiedenmeier]
    - Add support for snap create-user on Ubuntu Core images. [Ryan Harper]
      (LP: #1619393)
    - Fix sshd restarts for rhel distros. [Jim Gorz] (LP: #1470433)
    - OpenNebula: replace 'ip' parsing with cloudinit.net usage.
    - Fix python2.6 things found running in centos 6.
    - Move user/group functions to new ug_util file [Joshua Harlow]
    - DigitalOcean: enable usage of data source by default.
    - update Gentoo initscripts to run in the correct order [Matthew Thode]
    - MAAS: improve the main of datasource to look at kernel cmdline config.
    - tests: silence the Cheetah UserWarning about NameMapper C version.

 -- Scott Moser <smoser@xxxxxxxxxx>  Tue, 25 Oct 2016 17:06:59 -0400

** Changed in: cloud-init (Ubuntu)
       Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
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

Bug description:
  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