How to configure the Landscape Client snap

You must have the Landscape Client snap installed on at least one client device before configuring it with landscape-client.config. For instructions, see how to install the Landscape Client snap.

This document describes how to configure the Landscape Client snap in multiple ways. If you’re using the Debian package instead of the snap, see how to configure Landscape Client.

Contents:

Use landscape-client.config

After you’ve installed the landscape-client snap, you can use landscape-client.config to configure it on your client devices. Running landscape-client.config without any arguments starts the configuration, and you’ll be prompted to provide any information needed to run.

Some example commands with landscape-client.config are:

sudo landscape-client.config
sudo landscape-config --silent --account-name="standalone"

To view all possible configuration options for landscape-client.config, visit the help page with:

landscape-client.config --help

SSL certificates

If you’re using Ubuntu Core and require your own SSL certificates, you must place the certificate in /var/snap/landscape-client/ and provide the full path to the --ssl-public-key option. For example, if you place the CA file in /var/snap/landscape-client/ssl/server.pem, then you can register the computer with:

sudo landscape-config --ssl-public-key /var/snap/landscape-client/ssl/server.pem

Auto-register new devices

These steps are for automatically registering devices that are manually configured. If you’re registering a large-scale deployment of Ubuntu Core devices, you may want to auto-register them through the build image configuration. For more information, see how to create an Ubuntu Core image with Landscape Client included.

You can automatically register new Landscape Client snap devices when they’re configured using a registration key. This eliminates the need for manual approval of each device. This feature is enabled by default.

To use this feature in the Landscape web portal:

  1. Navigate to your Account tab

  2. If the Registration key field is blank, set a new registration key. You can set the registration key to be whatever you want, but trailing spaces, semi-colon (;) or hash (#) characters are not allowed.

  3. Select Auto register new computers if it’s not already selected. Clearing this checkbox will disable the auto-registration feature.

  4. Click Save

When this feature is enabled, new devices must be enrolled using the key that’s defined in the Registration key field. You can’t auto-register new computers if there is no registration key provided.

Once you’ve defined a registration key and enabled the auto-registration feature, you can auto-register new computers by passing the --registration-key argument into landscape-client.config. For example, the following code registers a new Landscape Client computer with a registration key. The {ACCOUNT_NAME}, {COMPUTER_TITLE} and {REGISTRATION_KEY} placeholders must be changed to the appropriate values for your configuration.

sudo landscape-client.config --account-name={ACCOUNT_NAME} --computer-title={COMPUTER_TITLE} --registration-key={REGISTRATION_KEY}

Manage script execution

The Landscape Client snap has a plugin that allows an administrator to execute scripts remotely on any client snap device. This plugin is enabled by default, although you can manually disable it.

If you want to disable remote script execution, you can disable it by manually editing /var/snap/landscape-client/common/etc/landscape-client.conf. Delete the following line from the [client] section of that file:

include_manager_plugins=ScriptExecution

To re-enable it, add that line back to the client.conf file, or run the following:

sudo landscape-client.config --include-manager-plugins=ScriptExecution