Kaseya Community

Mac Hostname Changes

This question has suggested answer(s)

Still a newbie at Kaseya. We currently pull the Computer Names to use for Machine ID's unfortunately we have a batch that never received the correct Computer Name prior to Kaseya's installation. 

I'm trying to find a way to change the Computer Name and Local Host Name on a Mac using Kaseya. Does anyone know of a way to do this. I've seen some scripts for the PC, but I have not come across anything for the Mac. I'd love to chat with any Apple Kaseya gurus out there.


[edited by: agavalla at 8:49 AM (GMT -8) on 2-24-2011] fixed a typo
All Replies
  • Simpliest way would be to go to:

    System tab> Naming Policy > select the group and tick Force Machine ID to alway be computer name

    P.S.  I would recommend not leaving this setting on forever, as I have seen issues around virtual servers (Xen and the like) where the agent has a hissy fit, and half deletes itself.

  • I have that turned on,and it's working, but the computer names are wrong so the machine ID is incorrect. Thanks for the heads up on not leaving the Force Machine ID.

  • I have a possible solution that seems to work and would appreciate any feedback from those who might know if what I'm doing is okay.

    I created a procedure to Execute a Shell command. On the mac there is a terminal (command line) utility called scutil. 

    Keep in mind on a Mac there are three types of names. ComputerName , LocalHostName, and a HostName. Bellow are the commands I used to set each one.

    scutil --set ComputerName TheNameYouChoose

    scutil --set LocalHostName TheNameYouChoose

    scutil --set HostName TheNameYouChoose

    I'm not a grandmaster Mac admin, so I'm not completely sure how the machine uses each name type, but I do know that if the HostName is set Kaseya will use that over the other two. This can be a little troublesome, because the ComputerName and the LocalHostName are viewable in the System Preferences > Sharing. Users can see those names, and the system presents the ComputerName and LocalHostName when using various types of sharing.

    I'm not setting the HostName, which leaves it blank. This way the ComputerName the user sees and the Machine ID in Kaseya creates will match up. 


    Any thoughts?


    My next step is to figure out how to pull in the system serial number and parse out the last six digits and apply that to the ComputerName.







  • Create an agent procedure that will run these shell commands:

    scutil --set ComputerName TheNameYouChoose

    scutil --set LocalHostName TheNameYouChoose

    scutil --set HostName TheNameYouChoose