Skip to content

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

@neitsab

Description

@neitsab

Documentation request

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:

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)

  ssh_import_id:
    - lp:falcojr
    - gh:TheRealFalcon

So either we remove the sentence or add the matching code, as you see fit.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationThis Pull Request changes documentationgood first issuehacktoberfestIssues to be completed during Hacktoberfest. Curated list of good first issue tags.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions