ITADN

[docs]: Users and Groups module schema examples code blocks differ from explanation text

#6857Openneitsab 创建于 2026-04-30
documentationgood first issuehacktoberfest
N
neitsabcommented
# Documentation request <!-- Please include affected doc URL, command line utility or tool --> https://docs.cloud-init.io/en/latest/reference/modules.html#mod-cc-users-groups "Examples" tab : the sentence > Password-based login is rejected, but the GitHub user `TheRealFalcon` and the Launchpad user `falcojr` can SSH as `newsuper`. has made its way to examples 3 and 4 explanations, but is not reflected in the given examples (emphasis mine): > Example 3: Skip creation of the `default` user and only create `newsuper`. **Password-based login is rejected, but the GitHub user `TheRealFalcon` and the Launchpad user `falcojr` can SSH as `newsuper`**. The default shell for `newsuper` is bash instead of system default. > > ``` > #cloud-config > users: > - name: newsuper > shell: /bin/bash > ``` > > Example 4: Skip creation of the `default` user and only create `newsuper`. **Password-based login is rejected, but the GitHub user `TheRealFalcon` and the Launchpad user `falcojr` can SSH as `newsuper`.** `doas`/`opendoas` is configured to permit this user to run commands as other users (without being prompted for a password) except not as root. > > ``` > #cloud-config > users: > - doas: [permit nopass newsuper, deny newsuper as root] > name: newsuper > ``` Source: * https://github.com/canonical/cloud-init/blob/207d38fa067a1dd265ab076bbc2f32e3b8bbe899/doc/module-docs/cc_users_groups/data.yaml#L73C21-L75C20 * https://github.com/canonical/cloud-init/blob/207d38fa067a1dd265ab076bbc2f32e3b8bbe899/doc/module-docs/cc_users_groups/data.yaml#L80C21-L82C20 Required matching code (from https://github.com/canonical/cloud-init/blob/207d38fa067a1dd265ab076bbc2f32e3b8bbe899/doc/rtd/reference/yaml_examples/user_groups.rst#add-users-to-the-system) ```yaml ssh_import_id: - lp:falcojr - gh:TheRealFalcon ``` So either we remove the sentence or add the matching code, do as you see fit. Thanks
2 条评论