/build/static/layout/Breadcrumb_cap_w.png

Automatically naming a Macintosh Computer using the K2000

Our PC users enjoy wsname as a way to automatically name their systems. We've developed a similar script for you to use to automatically name your Macintosh computers. There are 2 files included with this download:

  • mac_rename.sh
  • mac_names.txt

You do not need to modify mac_rename.sh unless you change the name of the text file or would like to add to the hostname.

The HostName can be modified to append your domain structure i.e. Macbook.kace.com or can be left as hostname i.e. MacBook.

Open mac_names.txt with a text editor. Add the serial number of a computer, a space, an equal sign, a space and then the name to give the computer. No spaces allowed in the computername.

serialnumber = computername

The document must be in this format for the process to work correctly.

Zip the 2 files together and upload the .zip file you created to the K2000 as a post install Macintosh application task. In the command line field type the following:

./mac_rename.sh

Save the task and add it as a post install task to your Macintosh image.

*Note: you must be a member of the K2000 ITNinja Community to download this file.


Comments

  • Anyone updated this script for OSX 10.11? We have been trying this on our fleet in the K2000 and the script fails. We have modified the script a bit and can query the serial + add a base name to rename the machine, but that defeats the purpose of having a text file full of serial numbers and desired names. Any thoughts? - ryanmiles1 7 years ago
    • This is still working for our 10.12.6 deployments. - brandnewhistory 6 years ago
This post is locked

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ