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}
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) 0ubuntu1~ 16.04.1 group,shadow}
2) cloud-init present is: 0.7.7~bzr1256-
3) useradd bob -m should create the user bob
4) useradd fails due to readonly /etc/{passwd,