2 Replies Latest reply on Sep 26, 2014 7:41 AM by csoto

    Mac's are reporting Device Name as something different from Computer Name



      We have been working on getting some Macs on our landesk solution. We do a manual install and it installs correctly.

      The problem is the Device Name does not reflect the Computer Name reported. The inventory points out the differences.

      The macs will get ahold of a name that is kind of random in our DNS. I have attached a screenshot for all to see. We can still control our macs via html5 and run inv.


      Would like to know fix and thanks for help.



        • 1. Re: Mac's are reporting Device Name as somthing different from Computer Name

          Hi Brian,


          I'm not sure what to tell you other then welcome to Unix. Computer Name and Network Name are not the same thing thus they can be different. This isn't a error in LANDesk. Mac OSX takes it further by adding a Bonjour name and... I know there is at least one more but it escapes me at the moment.


          Anyway basically what is happening is when OS X gets a DHCP address it does a reverse lookup to your DNS server to see what the name assosiated with that address is and that becomes its network name. If you don't like this behavior there are a few different things you can do.


          1. You can edit /etc/hostconfig and add the line HOSTNAME=[desired hostname] and reboot. This file is deprecated since 10.5, but it still worked last time I tried it.
          2. In System Preferences -> Sharing you can set the "computer name". If you click the "Edit..." button, you'll see a setting for "Use dynamic global hostname". Untick this to stop the DNS lookup and retain whatever setting you put in there.
          3. Set it in with a terminal command: sudo scutil --set HostName <MachineHostName_or_FQDN> (i.e. sudo scutil --set HostName server1.mynetwork.com)
          4. If your DHCP Server supports it you can go into System Preferences -> Network -> Select your adaptor on the left -> click the Advanced button -> Set the "DHCP client ID" to your hostname.
          5. On your windows DHCP server server turn on the option to dynamically update DNS A and PTR records for DHCP clients that do not request updates.
          • 2. Re: Mac's are reporting Device Name as something different from Computer Name
            csoto Specialist

            On Macs, the Computer Name will display as whatever DNS resolves to.  The Inventory agent (/Library/Application\ Support/LANDesk/bin/ldiscan) reports Computer Name from the Mac's HostName parameter, not the ComputerName parameter (what you type into the Sharing Preferences Pane).  In order to make these two the same, you can run the following command as root:

            /usr/sbin/scutil --get ComputerName | /usr/sbin/scutil --set HostName $1

            You can follow it with this command to update the inventory server:

            /Library/Application\ Support/LANDesk/bin/ldiscan -t


            [Edit: Command line parameters for ldiscan have changed since 9.6. While "--mini" no longer works, "-t" works on 9.6 and 9.5 (not sure of earlier versions)]

            1 of 1 people found this helpful