0

I'm using some application software which I have installed on an Azure VM. I have a MacBook laptop which I use to connect to the Azure VM, using Microsoft's Remote Desktop client for Mac software.

The software installed on the Windows Azure VM is proprietary (developed and licenced by a third party company), and only compatible with Windows (hence not running it locally on the MacBook). I've gone down the Azure route (as opposed to Bootcamp or Parallels for example) as I can take advantage of the cloud model - no worries on operating system licence costs, updates, maintenance and I can also turn it off when I don't need it (to save energy and cost).

The licence is for one user and one machine only, which is fine for my needs. So far as I understand it, the software's licencing algorithm takes the network hostname of the installed machine (i.e. Azure machine) and also the hostname of any remote connected client (i.e. my MacBook), concatenates both hostnames together, applies some sort of algorithm (presumably some sort of one-way hash), and records this as a HostID. The same algorithm is repeated on each sign-in and compared with the originally recorded HostID (thereby preventing someone else remotely connecting and using the software).

My problem is that my MacBook's hostname seems to be variable. Sometimes it is "mymacbook" and sometimes it is "mymacbook.local". If I connect to the Azure server, I think I can see my local hostname by going to task manager > users [tab] > client name [column - needed to add by right-clicking on the header and selecting column]. The variability of my client's hostname is causing the licencing to fail when it is not exactly the same as it was on the first installation.

I did a bit of research - if I understand correctly, the hostname is assigned to my MacBook by my local router as I am using DHCP? Also, Apple Bonjour, which is Apples mDNS implementation can cause .local to be appended onto the end of the hostname (e.g. when my MacBook is connected to or is in range of other devices)? Is this right or am I barking up the wrong tree!? Just trying to figure out whether I can control the hostname of my MacBook, before I write back to the software company to tell them that their licencing algorithm is incompatible.

Thanks in advance for any help, advice or pointers.

P.S. https://en.wikipedia.org/wiki/.local

Rob
  • 3
  • 1

1 Answers1

2

macOS tries a number of things to find out what hostname it should use, and goes with the first one that seems to work (here is a list of the things it tries). Usually, it either finds a name via reverse DNS lookup of its IP address (e.g. "mymacbook"), or falls back to using its Bonjour name (e.g. "mymacbook.local"). As a result, the hostname your Mac gets will depend on what network it's connected to, how that network and its DNS are set up, etc.

If you want to have a consistent hostname, you can set it in a higher-priority place in the list, so it'll always find that name (and use it) before trying to probe the network to find out what name it should use. The standard way to so this is in the system conguration database, with:

sudo scutil --set HostName your.hostname.here