summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2016-09-01 15:49:20 -0500
committerScott Moser <smoser@brickies.net>2016-10-20 15:40:36 -0400
commitd8534561ba76db25b6fc0044eb1bfda63686e859 (patch)
treef0dce5f0ab4a3dcf1a1bceb49b387628cfc98c14 /doc
parentba0adb9b5100735358a76fdee7b251dba224a4cd (diff)
downloadvyos-cloud-init-d8534561ba76db25b6fc0044eb1bfda63686e859.tar.gz
vyos-cloud-init-d8534561ba76db25b6fc0044eb1bfda63686e859.zip
Add support for snap create-user on Ubuntu Core images.
Ubuntu Core images use the `snap create-user` to add users to an Ubuntu Core system. Add support for creating snap users by adding a key to the users dictionary. users: - name: bob snapuser: bob@bobcom.io Or via the 'snappy' dictionary: snappy: email: bob@bobcom.io Users may also create a snap user without contacting the SSO by providing a 'system-user' assertion by importing them into snapd. Additionally, Ubuntu Core systems have a read-only /etc/passwd such that the normal useradd/groupadd commands do not function without an additional flag, '--extrausers', which redirects the pwd to /var/lib/extrausers. Move the system_is_snappy() check from cc_snappy module to util for re-use and then update the Distro class to append '--extrausers' if the system is Ubuntu Core.
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/cloud-config-user-groups.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/examples/cloud-config-user-groups.txt b/doc/examples/cloud-config-user-groups.txt
index 0e8ed243..9c5202f5 100644
--- a/doc/examples/cloud-config-user-groups.txt
+++ b/doc/examples/cloud-config-user-groups.txt
@@ -30,6 +30,7 @@ users:
gecos: Magic Cloud App Daemon User
inactive: true
system: true
+ - snapuser: joe@joeuser.io
# Valid Values:
# name: The user's login name
@@ -80,6 +81,13 @@ users:
# cloud-init does not parse/check the syntax of the sudo
# directive.
# system: Create the user as a system user. This means no home directory.
+# snapuser: Create a Snappy (Ubuntu-Core) user via the snap create-user
+# command available on Ubuntu systems. If the user has an account
+# on the Ubuntu SSO, specifying the email will allow snap to
+# request a username and any public ssh keys and will import
+# these into the system with username specifed by SSO account.
+# If 'username' is not set in SSO, then username will be the
+# shortname before the email domain.
#
# Default user creation: