Odds and Ends April 30, 2015 at 2:16 am

Quick Tip – Changing ComputerName Before DeployStudio Finalize

If you are in an AD environment and computer names come from somewhere else in your organization, it may be inconvenient when trying to quickly prepare a new machine. DeployStudio has a form workflow step to set some information you’d like customized for the computer, including the local name(for Bonjour) and computer name(for Apple Remote Desktop). Some AD binds dynamically append the search domain to the local name, or folks explicitly set that in some type of firstboot action, which I do with Outset. However, if there’s a lag between when the computer arrives to be prepared (or, I know it’s passeé, imaged) and when a network hostname is assigned, you can still let DeployStudio run everything like normal but change it before the finalize step, where domain binding actually happens.

While netbooted or otherwise going through your workflow in the DeployStudio Runtime, when prompted for a name in the workflow, just use a placeholder like ‘1234’. After the workflow completes, power the machine down or immediately target disk mode boot it. Once you have the name to be assigned to the machine and it’s connected to your admin workstation, just do the following:

  1. In /Volumes/<MacintoshHD>/private/etc/deploystudio/bin/ds_active_directory_binding.plist, replace ‘1234’ in the ‘id’ key with your desired computername.

  2. Likewise, replace occurrences of 1234 in /Volumes/<MacintoshHD>/private/etc/deploystudio/bin/ds_rename_computer.sh

And a tip for those that are trying to level up their vim-fu, :%s/1234/<correct_hostname>/g is how you’d do a find and replace for all instances of the string 1234 in the document you currently have open.

Allister Banks

Allister lives in Japan, has not read the Slack scroll back, and therefore has no idea what is going on.

More Posts - Website

Follow Me:
Twitter

Tags:

Leave a reply

You must be logged in to post a comment.