1,221
edits
(Importing a new version from external source) |
(Importing a new version from external source) |
||
Line 122: | Line 122: | ||
adds two users <code>sysadmin</code> and <code>user</code> with and without sudo permissions respectively. The <code><Insert public key></code> must be replaced with the public key to use for that user. Note that YAML is very picky about white space formatting, so that there must be a space after the "-" before your public key string. Also, this configuration overwrites the default user that is added when no CloudInit script is specified, so that the users listed in this configuration script will be the only users on the newly created VM so it is important to have at least one user with sudo permission. More users can be added by simply including another <code>- name: username</code> section. | adds two users <code>sysadmin</code> and <code>user</code> with and without sudo permissions respectively. The <code><Insert public key></code> must be replaced with the public key to use for that user. Note that YAML is very picky about white space formatting, so that there must be a space after the "-" before your public key string. Also, this configuration overwrites the default user that is added when no CloudInit script is specified, so that the users listed in this configuration script will be the only users on the newly created VM so it is important to have at least one user with sudo permission. More users can be added by simply including another <code>- name: username</code> section. | ||
If you wish to preserve the default user created by the distribution (debian, centos, ubuntu, etc.), use the following form: | If you wish to preserve the default user created by the distribution (users <code>debian, centos, ubuntu,</code> ''etc.''), use the following form: | ||
#cloud-config | #cloud-config |
edits