Which machine name is sent to the Sophos Enterprise Console in different situations, and how to override it if needed

  • Article ID: 119758
  • Rating:
  • 9 customers rated this article 1.0 out of 6
  • Updated: 04 Sep 2013
Applies to the following Sophos product(s) and version(s)


Sophos Anti-Virus for Mac OS X 

Determining the Machine Name that is sent to Sophos Enterprise Console

There are multiple machine names that can be used within the OS X operating system; however, these can all differ and lead to some confusion. The machine name that we should use, according to Apple's documentation, is the NetBIOS name that is referenced within the com.apple.smb.server.plist file.

Older versions of OS X may not contain the com.apple.smb.server.plist file; if this file cannot be found, we attempt to check the smb.plist file. Sophos Anti-Virus for OS X will check these files in this order to determine the machine name to send to Sophos Enterprise Console:

  1. /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist
  2. /etc/smb.plist 

The different machine names and how they change

There are four main machine names in the OS X operating system.  These can be seen by running the following commands:

  • scutil --get HostName
  • scutil --get ComputerName
  • scutil --get LocalHostName
  • less /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist | grep NetBIOSName -n1 | tail -n1

Note: Within 'System Preferences | Sharing' the user is able to set the name of the machine. This will set the value for ComputerName, LocalHostName, and after a reboot, the NetBIOSName if the machine has not been bound to a domain.

In most situations, the NetBIOSName referenced within com.apple.smb.server.plist will reflect the ComputerName. However, if the endpoint is bound to a domain, then the NetBIOSName will reflect the 'Client Computer ID' that was specified at the time of binding.

From this point on, the NetBIOSName will not be changed, regardless if the ComputerName changes. 

This can be seen through the following test cases:

  1. Initial Install

    Machine Name Type Value
    HostName not set
    ComputerName Jupp's Mac
    LocalHostName Jupp's Mac
    NetBIOSName jupps-mac
    ServerDescription jupp<E2><80><99>s Mac


  2. Change machines name in 'System Preferences | Sharing'

    Machine Name Type Value
    HostName not set
    ComputerName funkmasterflex
    LocalHostName funkmasterflex
    NetBIOSName jupps-mac
    ServerDescription funkmasterflex


  3. Reboot

    Machine Name Type Value
    HostName funkmasterflex
    ComputerName funkmasterflex
    LocalHostName funkmasterflex
    NetBIOSName funkmasterflex
    ServerDescription funkmasterflex



  4. Join Domain


    Machine Name Type Value
    HostName funkmasterflex
    ComputerName funkmasterflex
    LocalHostName funkmasterflex
    NetBIOSName PairingStation
    ServerDescription funkmasterflex


  5. Change machines name in 'System Preferences | Sharing'

    Machine Name Type Value
    HostName funkmasterflex
    ComputerName shiny
    LocalHostName shiny
    NetBIOSName PairingStation
    ServerDescription shiny


  6. Reboot

    Machine Name Type Value
    HostName shiny
    ComputerName shiny
    LocalHostName shiny
    NetBIOSName PairingStation
    ServerDescription shiny

How to override the Machine Name that is sent to Sophos Enterprise Console

The Remote Management System (RMS) that deals with the communication between Sophos Anti-Virus for Mac OS X and the Sophos Enterprise Console can be configured to allow the Machine Name, Domain Name, and Computer Description to be overridden and alternative values to be used.

Overriding Computer Name

To override the Computer Name, you will need to run the following commands, either manually via Terminal or within a script:

  1. sudo echo "\"ComputerNameOverride\"=\"NewName\"" >> "/Library/Sophos Anti-Virus/RMS/agent.config"
  2. sudo launchctl unload /Library/LaunchDaemons/com.sophos.managementagent.plist /Library/LaunchDaemons/com.sophos.messagerouter.plist
  3. sudo launchctl load /Library/LaunchDaemons/com.sophos.managementagent.plist /Library/LaunchDaemons/com.sophos.messagerouter.plist

Overriding Domain Name

To override the Domain Name, you will need to run the following commands, either manually via Terminal or within a script:

  1. sudo echo "\"DomainNameOverride\"=\"NewDomain\"" >> "/Library/Sophos Anti-Virus/RMS/agent.config"
  2. sudo launchctl unload /Library/LaunchDaemons/com.sophos.managementagent.plist /Library/LaunchDaemons/com.sophos.messagerouter.plist
  3. sudo launchctl load /Library/LaunchDaemons/com.sophos.managementagent.plist /Library/LaunchDaemons/com.sophos.messagerouter.plist

Overriding Computer Description

To override the Computer Description, you will need to run the following commands, either manually via Terminal or within a script:

  1. sudo echo "\"ComputerDescriptionOverride\"=\"NewDescription\"" >> "/Library/Sophos Anti-Virus/RMS/agent.config"
  2. sudo launchctl unload /Library/LaunchDaemons/com.sophos.managementagent.plist /Library/LaunchDaemons/com.sophos.messagerouter.plist
  3. sudo launchctl load /Library/LaunchDaemons/com.sophos.managementagent.plist /Library/LaunchDaemons/com.sophos.messagerouter.plist


 
If you need more information or guidance, then please contact technical support.

Rate this article

Very poor Excellent

Comments