local-users

Local Users

  • Canonical BootStack Charmers
Channel Revision Published Runs on
latest/stable 27 07 Jun 2024
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/stable 18 28 Apr 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/candidate 27 06 May 2024
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/candidate 18 06 Apr 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 76 26 Feb 2025
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 75 26 Feb 2025
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 74 26 Feb 2025
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 73 26 Feb 2025
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 64 08 Nov 2024
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 62 08 Nov 2024
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 61 08 Nov 2024
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 59 08 Nov 2024
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 19 03 May 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 6 14 Mar 2022
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
juju deploy local-users
Show information

Platform:

Ubuntu
22.04 20.04 18.04

Cryptography

SSH keys

This charm allows to setup unprivileged access to a Juju unit via the public SSH keys for each local user, which can be specified in two ways in the users charm config option:

  • Plaintext public SSH key
  • A Launchpad username prepended with lp:

The charm uses the ssh-import-id CLI for the second option to retrieve the keys. The CLI uses SSL/TLS to connect to Launchpad, validating the connection’s certificate and matching the hostname through the Requests library. Retrieved keys are in the same format as an ~/.ssh/authorized_keys file.

After the keys are parsed/retrieved, the charm writes the SSH public keys to the file path specified by the ssh_authorized_keys charm config option. The file is created with different permissions and ownerships depending on whether the file is located under the user’s home directory or not:

  • If the file is created under the new user’s home directory, the parent directory is set to 0o700, and ownership is given exclusively to the created user. The file’s permissions are set to 0o600 with the same ownership
  • If the file should be placed anywhere else, the 0o644 permission mode is given

Help improve this document in the forum (guidelines). Last updated 4 months ago.