MachineRenamer (Machine Renamer) for OS X
New Universal Binary Release: 2.0.3
October 2, 2009
MachineRenamer for Mac OS X will query the network information of the computer and compare it to a MachineRenamer preferences file. If there is a specific entry for the computer in the preference file, the computer's sharing name and Bonjour name will be set as the preference file specifies, otherwise, MachineRenamer will set the computer's sharing name and Bonjour networking name to a form of its current canonical DNS name.
MachineRenamer is useful in a lab or distributed environment if the same hard drive image is used to build multiple machines, preventing each computer from having either the same or an ambiguous sharing name and/or Bonjour name. The current release of MachineRenamer includes the following changes & fixes from the previous version from the year 2003:
New:
Fixed:
The following materials are available here:
The MachineRenamer Installer package will install all of the components need to dynamically configure a workstation. It will not, however, configure them. In a typical lab-use scenario, MachineRenamer is installed on the "master" machine whose hard drive will serve as the distributed image. After installing MachineRenamer, the settings file is configured as needed (detailed below) so that the same settings file will correctly configure any of the target computers.
How to obtain & use:
1. The computer must be running Mac OS X (10.5 +)
2. Download the installer package
3. Install the Package (requires "Admin" status)
Be sure to select the main startup disk as the installation disk.
4. Restart (Optional)
Admittedly, I was too lazy to make a formal, graphical configuration application to interface with the preferences file. However, there are a couple of fine alternatives: (a) use the Property List Editor (included with an installation of Mac OS X developer tools); or (b) use a text editor, like BBEdit Lite.
For the discussion here, we'll assume the Property List Editor, but in practice I use BBEdit. If using BBEdit, or a similar text editor, the text of the default preferences file is also downloadable, if you would like to see what the XML looks like in plain text.
The Property List Editor is located in the Applications folder of the Developer tools when they are installed. Use the PropertyListEditor program to open the /Library/Preferences/edu.northwestern.mmlc.MachineRenamer.plist file.
If installed by the MachineRenamer installer, the default preferences file (plist) should look like this when opened in Property List Editor:
The two most important settings are configurationType and identificationCriteria. The first, configurationType can be either manual or automatic. The second, identificationCriteria can be either IP Address or MAC Address. The third entry, machineList is a dictionary of sub-entries corresponding to specific computers.
Manual configuration: Implies that the MachineRenamer program should first search a list of machines (machineList) for either a MAC address or IP Address match (determined by identificationCriteria). If a match is found the computerName and bonjourName attributes are applied to the current computer. If a match is not found, MachineRenamer will attempt automatic configuration.
(a sample configuration via MAC address listings)
Automatic configuration: Implies that MachineRenamer should obtain all information from DNS queries to the network's name server. In this scenario, the computer name will be set to the FQDN (fully-qualified domain name) of the IP address (e.g. foomachine.lab.school.edu) and the Bonjour name will be set to the host portion (e.g. foomachine).
(a sample automatic configuration)
Note about saving changes: The file may be owned by the computer's root user or "superuser," so any changes might have to be first saved to the Desktop, and then copied back into place using a few commands in a Terminal window. Namely:
sudo cp ~/Desktop/edu.northwestern.mmlc.MachineRenamer.plist /Library/Preferences
Should the MachineRenamer program need to be deactivated, it would suffice to remove only the startup item. To do this, move or delete the following folder:
/Library/LaunchDaemons/edu.northwestern.mmlc.MachineRenamer.plist
Additionally, the other installed components are:
/Library/Preferences/edu.northwestern.mmlc.MachineRenamer.plist
/usr/local/sbin/MachineRenamer
Much of the code here is little more than cut and pasted from Apple DTS. Feel free to take the code and modify it to do what you need it to do. Suggestions and contributions always welcomed even if not always actively responded to.
Best regards. Use in good health.
© 2003-2009 Matthew Taylor (mtaylor@northwestern.edu), Multimedia Learning Center, Northwestern University