I recently had to install an old piece of software on our (headless) Ubuntu 20.04 Linux system. Our first hurdle was binaries not executing properly — on attempting to run executables, the error No such file or directory would appear. This was corrected by installing lsb-core:

$ sudo apt install lsb-core

The software we wanted to use had copy protection, specifically Macrovision’s FLEXlm license manager (now with Flexera Software). Our FLEXlm-protected software was provided with a node-locked license and this was tied to a specific MAC address on our machine. It’s possible to ask FLEXlm what’s the HostID (MAC address(es)) that it sees by running:

$ lmutil lmhostid
lmutil - Copyright (c) 1989-2006 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved.
The FLEXlm host ID of this machine is ""

Unfortunately, the software was unable to “see” our Ethernet adapter due to older versions of the software looking for Ethernet adapters starting with eth. The reason? systemd uses an alternative naming convention, formally part of the predictable network interface names, that essentially means Ethernet devices will start with en instead of the “traditional” eth prefix. We therefore needed a way of getting FLEXlm to see the Ethernet adapter.

The Solution

I originally attempted to attach an alias to our Ethernet adapter, but it turns out that an alias doesn’t quite do it nor does it appear visible to FLEXlm. Instead, the trick is to use Ubuntu’s netplan to rename the Ethernet adapter, telling it the new name by matching the associated MAC address. To do this, check what configuration files exist:

$ ls -l /etc/netplan/

In my case, I could only see one configuration file (/etc/netplan/00-installer-config.yaml) that contained a definition of the two Ethernet adapters that were found on install:

# This is the network config written by 'subiquity'
network:
    ethernets:
        ens123:
            dhcp4: yes
        ens456:
            dhcp4: yes
    version: 2

Taking a look at ifconfig or ip addr, the MAC address’s corresponding Ethernet adapter name (either ens123 or ens456 from the above example) can be identified. It is then a case of editing the configuration file (e.g. sudo vim /etc/netplan/00-installer-config.yaml) and altering it as appropriate. Taking the above example configuration file, let’s say ens456 had the desired MAC address of a1:b2:c3:d4:e5:f6 and we want it to be detected by FLEXlm, then we would change the above configuration to:

network:
    ethernets:
        ens123:
            dhcp4: yes
        eth0:
            match:
                macaddress: a1:b2:c3:d4:e5:f6
            dhcp4: yes
            set-name: eth0
    version: 2

Note: Whitespaces between the key/value pairs are important, otherwise the YAML isn’t parsed correctly. Likewise, indentation is important.

Next, try out the new netplan configuration:

$ sudo netplan try

You should then be prompted with a countdown message if the configuration was parsed and set up correctly. After the countdown, the previous configuration will be reverted, so confirm the configuration by pressing the enter key. If something wasn’t quite right, then wait a minute or two for the system to revert to the previous state and try again.

Finally, apply the configuration file:

$ sudo netplan apply

The new configuration file will now be applied and should be applied automatically on reboot.

Note: In some rare cases, a reboot is necessary for the name change to be applied. This wasn’t the case for me, but it may be required in your case.

Finally, re-run the FLEXlm tool to check the HostID status. If everything works, FLEXlm should return a MAC address:

$ lmutil lmhostid
lmutil - Copyright (c) 1989-2006 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved.
The FLEXlm host ID of this machine is "a1b2c3d4e5f6"

Et voila! The FLEXlm-protected software should now work on the system!

Next Post Previous Post