summaryrefslogtreecommitdiff
path: root/doc/examples/cloud-config-user-groups.txt
AgeCommit message (Collapse)Author
2021-09-24Remove invalid ssh_import_id from examples (#1031)James Falcon
2021-05-14[examples] config-user-groups expire in the future (#902)Geert Stappers
Changed year 2012 into 2032
2020-10-30Correct documentation and testcase data for some user-data YAML (#618)dermotbradley
For cc_users_groups the user setting "expiredate" must be quoted in order for the relevant flag and value to be then passed to the useradd command. It its vaiue is not quoted then it is treated as Python type datetime.date and in `cloudinit/distros/__init__.py` the below "is it a string" condition fails and so no "--expiredate" parameter is passed to useradd and therefore it has no effect: ``` if key in useradd_opts and val and isinstance(val, str): useradd_cmd.extend([useradd_opts[key], val]) ``` For cc_users_groups, the user setting "inactive" does not actually disable accounts, the useradd "--inactive" option actually defines the number of days after password expiry that users can still login. So I have changed the docs to show it taking a quoted value of days (which works with the current code) rather than a boolean value. The quotes are necessary, like expiredate above, so that the value is also passed to the useradd command. For cc_power_state_change.py the "delay" setting value needs to have quotes around it as otherwise its leading plus sign will be stripped off.
2020-08-13Fix 'Users and Groups' configuration documentation (#530)sshedi
Few of the 'User and Groups' configurations in cloud-config have no effect on already existing users. This was not documented earlier. This change set adds that information to documentation. Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2020-04-22YAML align indent sizes for docs readability (#323)Tak Nishigori
This proposal has been aligned in a human readable. There are no changes to this except for spac The indentation size is not specifically defined in the YAML RFC $ make yaml has passed on my-machine I set the indentation size to the largest number of articles in the repository (dictionary: 2) (And also include nishigori as a CLA signer.)
2019-08-20Add missing #cloud-config comment on first example in documentation.Florian Müller
Since this is the first code snippet some users might see, they could end up in the same situation like me today when they wonder why their yaml user config is not working at all.
2018-09-08config: disable ssh access to a configured user accountChad Smith
Cloud config can now disable ssh access to non-root users. When defining the 'users' list in cloud-configuration a boolean 'ssh_redirect_user: true' can be provided to disable ssh logins for that user. Any ssh 'public-keys' defined in cloud meta-data will be added and disabled in .ssh/authorized_keys. Any attempts to ssh as this user using acceptable ssh keys will be presented with a message like the following: Please login as the user "ubuntu" rather than the user "youruser".
2018-06-19Explicitly prevent `sudo` access for user moduleJacob Bednarz
To deny a user elevated access, you can omit the `sudo` key from the `users` dictionary. This works fine however it's implicitly defined based on defaults of `cloud-init`. If the project moves to have `sudo` access allowed for all by default (quite unlikely but still possible) this will catch a few people out. This introduces the ability to define an explicit `sudo: False` in the `users` dictionary and it will prevent `sudo` access. The behaviour is identical to omitting the key. LP: #1771468
2018-04-03correct documentation to match correct attribute name usage.Dominic Schlegel
LP: #1420018
2017-10-18schema: Log debug instead of warning when jsonschema is not available.Scott Moser
When operating in expected path, cloud-init should avoid logging with warning. That causes 'WARNING' messages in /var/log/cloud-init.log. By default, warnings also go to the console. Since jsonschema is a optional dependency, and not present on xenial and zesty, cloud-init should not warn there. Also here: * Add a test to integration tests to assert that there are no warnings in /var/log/cloud-init.log. * Update one integration test that did show warning and the related documentation and examples. LP: #1724354
2016-10-20Add support for snap create-user on Ubuntu Core images.Ryan Harper
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.
2016-01-29Correct lock_passwd in docsRobert Jennings
2014-06-09doc: fix user-groups doc to reference plural ssh-authorized-keysScott Moser
LP: #1327065
2013-10-02fix permission changesScott Moser
2013-10-02use long format args rather than shortScott Moser
2013-10-01Fix typo in mkpasswd command: '-s' was used instead of '-R' for salt rounds.Eric Nordlund
Remove duplicate 'password' text.
2012-10-23move default user info out of code and into configScott Moser
Remove the need to have 'default_user' and 'default_user_groups' groups be hard coded into the distro class, instead let that set of configuration be located in the config file where it should be specified instead.
2012-09-21Fix some docs + pylint warnings + log on default created in the module.Joshua Harlow
2012-09-211. Cleanup the user creation so that the distro class isJoshua Harlow
responsible only for creating users and groups and normalizing a input configuration into a normalized format that splits up the user list, the group list and the default user listsand let the add user/group config module handle calling those methods to add its own users/groups and the default user (if any). 2. Also add in tests for this normalization process to ensure that it is pretty bug free and works with the different types of formats that users/groups/defaults + options can take.
2012-09-18Add support for useradd --selinux-user''Garrett Holmstrom
2012-08-31incorrect example in docScott Moser
2012-08-31- Converted user list to user dict to allow exclusion of the default userBen Howard
on Ubuntu systems via cloud-config (LP: #1041384). - Fixed bug with user creation on Ubuntu where the default user groups are not set properly (LP: #1044044). - Fixed documentation for user creation (LP: #1044508).
2012-08-27move user-groups section from cloud-config.txt to its own file.Scott Moser
move the section on user and group adds into doc/examples/cloud-config-user-groups.txt