diff options
author | Ben Howard <ben.howard@canonical.com> | 2012-08-20 14:52:31 -0600 |
---|---|---|
committer | Ben Howard <ben.howard@canonical.com> | 2012-08-20 14:52:31 -0600 |
commit | 336ddbe13bdfc729495f5bfb8cc89b4360916157 (patch) | |
tree | 3d551bde0b99b0db8c1c33f9bbd7e9e22acebb2f /config | |
parent | 4540821caa31dc9ed0bedf521cd36975ddafebfa (diff) | |
download | vyos-cloud-init-336ddbe13bdfc729495f5bfb8cc89b4360916157.tar.gz vyos-cloud-init-336ddbe13bdfc729495f5bfb8cc89b4360916157.zip |
Added "userless" mode to cloud-init for handling the creation of the
users and the default user on Ubuntu.
cloudinit/config/cc_users_groups.py: new cloud-config module for creating
users and groups on instance initialization.
- Creates users and group
- Sets "user" directive used in ssh_import_id
cloudinit/config/cc_ssh_import_id.py: module will rely upon users_groups
for setting the default user. Removed assumption of 'ubuntu' user.
cloudinit/distros/__init__.py: Added new abstract methods for getting
and creating the default user.
cloudinit/distros/ubuntu.py: Defined abstract methods for getting and
and creating the default 'ubuntu' user on Ubuntu instances.
cloudinit/util.py: Added ability to hide command run through util.subp to
prevent the commands from showing in the logs. Used by user_groups
cloud-config module.
config/cloud.cfg: Removed "user: ubuntu" directive and replaced with new
user-less syntax.
doc/examples/cloud-config.txt: Documented the creation of users and groups.
Diffstat (limited to 'config')
-rw-r--r-- | config/cloud.cfg | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/config/cloud.cfg b/config/cloud.cfg index 2b4d9e63..7933b4ce 100644 --- a/config/cloud.cfg +++ b/config/cloud.cfg @@ -1,8 +1,9 @@ # The top level settings are used as module # and system configuration. -# This user will have its password adjusted -user: ubuntu +# Implement for Ubuntu only: create the default 'ubuntu' user +users: + default: true # If this is set, 'root' will not be able to ssh in and they # will get a message to login instead as the above $user (ubuntu) @@ -36,6 +37,7 @@ cloud_config_modules: # this can be used by upstart jobs for 'start on cloud-config'. - emit_upstart - mounts + - users-groups - ssh-import-id - locale - set-passwords |