Why a macOS Device's Hostname Looks Different in the Automox Console

Sometimes a macOS device shows up in the Automox Console under a hostname that does not match what you see locally on the machine, for example jdoe-48201.corp.local instead of Marketing-MacBook-Pro. This usually is not an agent problem. macOS keeps three separate name values, and your network can influence which one is reported.

This article explains why the names can drift apart, how to confirm the device is actually enrolled, and how to standardize the hostname on macOS.

If you suspect the device is missing entirely, start with My Device Is Missing from the Automox Console first. That article walks through fingerprint-based identification and how to locate the device by device_uuid in amagent.log.

Why the Hostname Can Differ

macOS stores three independent name values, and they are allowed to be different from each other:

  • HostName: the system hostname used for command-line and network identity
  • LocalHostName: the Bonjour name used on the local network
  • ComputerName: the friendly name shown in Finder and System Settings

When any of these are unset, macOS may fall back to a name supplied by DHCP, DNS, or reverse DNS. That is why VPN clients (Global Protect, Cisco AnyConnect, and similar), corporate Wi-Fi, and public networks can cause the reported hostname to change.

If you expect Marketing-MacBook-Pro but Automox shows jdoe-48201.corp.local, the network is most likely supplying that FQDN at check-in time.

Confirm the Current Name Values on macOS

Run the following in Terminal:

hostname
scutil --get HostName
scutil --get LocalHostName
scutil --get ComputerName

If these values disagree, that mismatch is what the Automox agent is seeing too.

Set the Hostname Manually

To pin the device name so it stops shifting with the network, set all three values:

sudo scutil --set HostName <new-hostname>
sudo scutil --set LocalHostName <new-hostname>
sudo scutil --set ComputerName "<new-computer-name>"

Example:

sudo scutil --set HostName marketing-macbook-pro
sudo scutil --set LocalHostName marketing-macbook-pro
sudo scutil --set ComputerName "Marketing MacBook Pro"

The new name will appear in the Console on the next agent check-in. Because Automox identifies devices by fingerprint and not hostname alone, the existing device record will simply update; a new device will not be created.

If the Device Still Looks Wrong

A few common follow-ups:

  • The hostname only changes on VPN. Work with your network or VPN team. DNS, search domains, or reverse DNS records pushed by the VPN are likely overriding the local name.
  • amagent.log shows repeated lookup rtt.automox.com: no such host errors. The agent cannot resolve Automox endpoints. Verify DNS, VPN split-tunnel rules, and that the required Automox hostnames are allowlisted.
  • A passing self-test but the device still looks wrong. Self-test confirms the agent's modules are healthy, not that the hostname is correct. Use the fingerprint approach in the missing device article to confirm identity.
Was this article helpful?
0 out of 0 found this helpful