The Ubuntu Advantage (UA) client is a tool designed to automate access to UA services like Extended Security Maintenance (ESM), CIS, FIPS, and more. The client is available for all Ubuntu LTS releases. Features might depend on the specific LTS release as they do or do not apply. The updated client provides users a command-line interface with a single point to access all UA services. This simplifies access to UA Services and allows access to UA services for all users of Ubuntu with a free tier of service. See https://ubuntu.com/advantage for more details on the various UA services.
Working with specific services
Extended Security Maintenance (ESM)
- Make sure that you have the latest UA client installed on your Ubuntu 16.04 LTS machine.
- Follow the instructions on https://ubuntu.com/advantage/ to retrieve your UA token and get started with ESM.
Keep reading if you want more detailed instructions, or have questions
Installing the UA client
The UA client is installed through
apt. Make sure to confirm you have the latest Ubuntu Advantage client which is equal to or greater than version 27.
$ ua --version
Once you have verified your client, you will need to attach it to your UA account.
Attach the UA client
$ sudo ua attach YOUR_TOKEN
You should see output like the following, indicating that you have successfully associated this machine with your account.
Enabling default service esm-infra Updating package lists ESM Infra enabled This machine is now attached to 'UA Infra - Essential (Virtual)' SERVICE ENTITLED STATUS DESCRIPTION cis yes disabled Center for Internet Security Audit Tools esm-infra yes enabled UA Infra: Extended Security Maintenance (ESM) fips yes n/a NIST-certified FIPS modules fips-updates yes n/a Uncertified security updates to FIPS modules livepatch yes n/a Canonical Livepatch service NOTICES Operation in progress: ua attach Enable services with: ua enable <service>
Once the UA client is attached to your UA account, you can use it to activate various services, including: access to ESM packages, Livepatch, FIPS, and CIS. Some features are specific to certain LTS releases
Users can use the
status subcommand to get the current status and see what services are enabled or disabled:
$ sudo ua status SERVICE ENTITLED STATUS DESCRIPTION cis yes disabled Center for Internet Security Audit Tools esm-infra yes enabled UA Infra: Extended Security Maintenance (ESM) fips yes n/a NIST-certified FIPS modules fips-updates yes n/a Uncertified security updates to FIPS modules livepatch yes n/a Canonical Livepatch service Enable services with: ua enable <service> Account: Subscription: UA Applications - Essential (Virtual) Valid until: 2022-12-31 00:00:00 Technical support level: essential
Extended Security Maintenance (ESM)
For Ubuntu 14.04 LTS and 16.04 LTS as shown above, ESM will be automatically enabled after attaching the UA client to your account. After ubuntu-advantage-tools is installed and your machine is attached, ESM should be enabled. If ESM is not enabled, you can enable it with the following command:
$ sudo ua enable esm-infra
With the ESM repository enabled, you may see a number of additional package updates available that were not available previously. Your system may have indicated that it was up to date before installing the ubuntu-advantage-tools, but make sure to check for new updates with
apt update. If you have cron jobs set to install updates, or other unattended upgrades configured, be aware that this will likely result in a number of package updates after ESM is enabled.
$ sudo apt update
apt upgrade will show a number of package updates available.
$ sudo apt upgrade
More information: https://ubuntu.com/security/esm
- kernel version 4.4 or above (16.04+ delivered via the HWE Kernel https://wiki.ubuntu.com/Kernel/LTSEnablementStack)
- The ESM repo enabled and up-to-date specifically packages like snapd.
To enable run:
$ sudo ua enable livepatch
You should see output like the following, indicating that the Livepatch snap package has been installed.
One moment, checking your subscription first Installing snapd Updating package lists Installing canonical-livepatch snap Canonical livepatch enabled.
To check the status of Livepatch once it has been installed use this command
$ sudo canonical-livepatch status
More information: https://ubuntu.com/security/livepatch
CIS Audit Tools
To access the CIS tooling first enable the software repository.
$ sudo ua enable cis Installing CIS Audit packages CIS Audit enabled Visit https://security-certs.docs.ubuntu.com/en/cis to learn how to use CIS
Once the feature is enabled please follow the documentation for the CIS tooling to run the provided hardening audit scripts.
Security Certifications (FIPS / Common Criteria)
FIPS and Common Criteria are supported on 16.04+, please see https://docs.ubuntu.com/security-certs/en/. The UA client will be updated for 16.04+ at a later date.
Note (2021-07-07): Proxy configuration is currently only available in the UA Client Daily PPA, but will be released as a standard Ubuntu update v27.2 in the coming weeks.
The UA Client can be configured to use an http/https proxy as needed for network requests. In addition, the UA Client will automatically set up proxies for all programs required for enabling Ubuntu Advantage services. This includes APT, Snaps, and Livepatch.
To configure standard http and/or https proxies, run the following commands:
$ sudo ua config set http_proxy=http://host:port $ sudo ua config set https_proxy=https://host:port
After running the above commands, UA Client performs the following:
- Verifies that the proxy is working by using it to reach
- Configures itself to use the given proxy for all future network requests
- If snapd is installed, configures snapd to use the given proxy
- If Livepatch has already been enabled, configures Livepatch to use the given proxy
- If Livepatch is enabled after this command, UA Client will configure Livepatch to use the given proxy at that time.
To remove http/https proxy configuration, run the following:
$ sudo ua config unset http_proxy $ sudo ua config unset https_proxy
After running the above commands, UA Client will also remove proxy configuration from snapd (if installed) and Livepatch (if enabled).
APT proxy settings are configured separately. To have UA Client manage your APT proxy configuration, run the following commands:
$ sudo ua config set apt_http_proxy=http://host:port $ sudo ua config set apt_https_proxy=https://host:port
After running the above commands, UA Client:
- Verifies that the proxy works by using it to reach
- Configures APT to use the given proxy by writing an apt configuration file to
Note: Any configuration file that comes later in the
apt.conf.ddirectory could override the proxy configured by the UA Client.
To remove the APT proxy configuration, run the following:
$ sudo ua config unset apt_http_proxy $ sudo ua config unset apt_https_proxy
If your proxy server requires authentication, you can pass the credentials directly in the URL when setting the configuration, as in:
$ sudo ua config set https_proxy=https://username:password@host:port
Checking the configuration
To see what proxies UA Client is currently configured to use, you can use the
$ sudo ua config show
The above will output something that looks like the following if there are proxies set:
http_proxy http://proxy https_proxy https://proxy apt_http_proxy http://aptproxy apt_https_proxy https://aptproxy
Or it may look like this if there aren’t any proxies set:
http_proxy None https_proxy None apt_http_proxy None apt_https_proxy None
Why are we updating the client?
The updated client provides users a command-line interface with a single point to access all UA services. This reduces the number of tokens a customer has to manage as the old mechanism was one token per service.
Will the old ESM system stay in place for the entire Ubuntu 14.04 LTS ESM lifetime?
Yes. If you have ESM provisioned using the old client or manually you do not have to change.
Ubuntu.com/advantage shows I have 0? Why? I have more licenses.
The number is showing 0 attached to the subscription - not your total license amount.
How do I attach/login/activate?
You have to obtain your token and run:
ua attach <token>
Where do I get a token?
How do I use SSO?
SSO is available from a user’s Ubuntu One account and can be created at https://login.ubuntu.com/.
What services get enabled by default?
ESM would be enabled by default where possible. Livepatch will not be auto-enabled on Ubuntu 14.04 LTS, but is enabled by default on later series. If a service is not applicable on the platform or release then the service will be skipped
I already have UA, and use Landscape to manage my devices, can I attach and manage UA from Landscape?
Not at this time. That said, you can automate the rollout using Landscape’s ability to execute commands on systems under management.
What does ‘’‘entitled’’’ mean?
Entitled shows whether your contract with us includes this Ubuntu Advantage service or not.
Why does the STATUS column say ‘’‘n/a’’’ if I am ‘’‘entitled’’’ to the service?
This service may not be applicable to the system you are currently on. Here are some examples:
- FIPS is currently only supported on Xenial and Bionic. If you are on any other release, FIPS would show up as ‘’‘n/a’’’.
- On Ubuntu 14.04 LTS, Livepatch is only available if you have the HWE kernel installed and are booted into it. Otherwise it shows ‘’‘n/a’’’.
- If you are on a container, you cannot install Livepatch.
Where can I file bugs?
Things are failing, what logs are useful?
First, consider using the
--debug option to see what might be failing. Otherwise, checkout
/var/log/ubuntu-advantage.log. If including this log file in a bug report, please sanitize it first, as it will likely contain secrets!
I’m attaching successfully, but not showing entitled to anything? I have a commercial contract.
Please open a https://support.canonical.com/ with the output of
sudo ua status --format json
I upgraded from Trusty with ESM to Xenial and now it does not show I have ESM enabled any longer
This is a known issue and can be resolved by re-enabling ESM using
sudo ua enable esm-infra after rebooting the system into Xenial. See https://github.com/canonical/ubuntu-advantage-client/issues/1590
My cloud-init cloud-config is no longer working to enable UA products
Customers using the following cloud-config userdata will have to update to use the new cmdline client ‘ua attach’, ‘ua enable’ commands.
#cloud-config ubuntu_advantage: commands: XXX runcmd: ubuntu-advantage enable-fips