Contribute  :  Advanced Search  :  Directory  :  Forum  :  FAQ's  :  My Downloads  :  Links  :  Polls  
AFP548 Changing the world one server at a time.
Welcome to AFP548
Tuesday, February 09 2010 @ 09:19 am CST
   

ByHost Preference Name Scheme Changes

TipsBy now you have probably noticed that the naming scheme for ByHost preferences has changed in Leopard. The files no longer have a MAC address in them, but rather some UUID of mysterious origin.

All in all this was done to give Macs a far more unique identifier than just the MAC address. For those of you that are still using login scripts to fix ByHost prefs though it can be a pain. Luckily this UUID is stored in  the IO registry and is easy to find.

ioreg -rd1 -c IOPlatformExpertDevice | grep -E '(UUID)'

Is all you need to pull the UUID from the system so you can use it in a script.

All that said the best way to manage ByHost preferences is still with MCX policy!

Story Options

Advertising

ByHost Preference Name Scheme Changes | 13 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
ByHost Preference Name Scheme Changes
Authored by: pnerum on Thursday, March 13 2008 @ 08:30 am CDT
Can you give me some pointers to manage ByHost prefs with MCX???
ByHost Preference Name Scheme Changes
Authored by: Anonymous on Thursday, March 13 2008 @ 05:04 pm CDT
I have been working with a few test images of 10.5.0 and 10.5.2 and restored them to a two year old Mac Book Pro and Mac Pro purchased last August so I thought I would check out the ByHosts folder after reading this and it still seems to be using the MAC address. Is it possible that I used an older version of NetRestore that used the MAC address as it was restoring (and applying the ByHost fix) and Leopard still honors the MAC address without complaining? Or maybe it is only doing this on very recent Macs?
ByHost Preference Name Scheme Changes
Authored by: dds on Sunday, March 16 2008 @ 11:54 am CDT
Am I missing something?

I have several leopard-based production Macs. None were upgraded from Tiger. Clean isntalls. All running 10.5.2.

All of the byHost files still have the MAC addresses in their file names...


mp08azvwgl:db dds$ ls -l ~/Library/Preferences/ByHost/
total 1512
-rw------- 1 dds 1580659170 567 Mar 15 11:18 com.apple.Bluetooth.0017f2339dec.plist
-rw------- 1 dds 1580659170 261 Jan 30 15:24 com.apple.HIToolbox.0017f2339dec.plist
...
-rw------- 1 dds 1580659170 144 Jan 29 12:45 com.apple.TimeMachine.0017f2339dec.plist
-rw------- 1 dds 1580659170 190 Feb 12 11:21 com.apple.eap.bindings.0017f2339dec.plist
-rw------- 1 dds 1580659170 89 Mar 16 10:56 com.apple.iCal.helper.0017f2339dec.plist
-rw------- 1 dds 1580659170 53187 Mar 8 10:23 com.apple.iTunes.0017f2339dec.plist
...



mp08azvwgl:db dds$ networksetup -getmacaddress en0
Ethernet Address: 00:17:f2:33:9d:ec (Device: en0)


mp08azvwgl:db dds$ ifconfig en0 | grep eth
ether 00:17:f2:33:9d:ec


mp08azvwgl:db dds$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.5.2
BuildVersion: 9C31



ByHost Preference Name Scheme Changes
Authored by: Anonymous on Thursday, March 20 2008 @ 12:18 pm CDT
Like other people here all my Leopard clients, which where fresh installs, still use the Mac address in the byhosts naming scheme.
ByHost Preference Name Scheme Changes
Authored by: kevinberny on Wednesday, June 04 2008 @ 12:13 am CDT
en0's MAC address and the UUID are very very close. In most cases, just a preceding 0 (at least on the couple of machines I checked). However, on all the machines I checked, they were indeed using the UUID. Here's how I have been grabbing it for my ByHost update script:
ioreg -rd1 -c IOPlatformExpertDevice | grep -i "UUID" | cut -c51-62 | awk {'print tolower()'}
Hope this helps someone else.
ByHost Preference Name Scheme Changes
Authored by: kevinberny on Tuesday, June 17 2008 @ 11:11 pm CDT
3rd times a charm.... Tested across several different models and vintages. # DYNAMICALLY SET THE LEOPARD UUID FOR THE BYHOST FILE NAMING if [[ `ioreg -rd1 -c IOPlatformExpertDevice | grep -i "UUID" | cut -c27-50` == "00000000-0000-1000-8000-" ]]; then LEOUUID=`ioreg -rd1 -c IOPlatformExpertDevice | grep -i "UUID" | cut -c51-62 | awk {'print tolower()'}` elif [[ `ioreg -rd1 -c IOPlatformExpertDevice | grep -i "UUID" | cut -c27-50` != "00000000-0000-1000-8000-" ]]; then LEOUUID=`ioreg -rd1 -c IOPlatformExpertDevice | grep -i "UUID" | cut -c27-62` fi Example usage: defaults write $HOME/Library/Preferences/ByHost/com.apple.screensaver.${LEOUUID} askForPassword -int 1 mv /private//tmp/com.apple.eap.bindings.0011ffd12345.plist /private/tmp/com.apple.eap.bindings.${LEOUUID}.plist
ByHost Preference Name Scheme Changes
Authored by: icondaemon on Wednesday, August 13 2008 @ 10:10 am CDT

Heads up!

On a brand-new Leopard 10.5.4 - 2.4ghz MacBook connected with AirPort, ByHost naming follows an even newer convention, but on a relatively new Intel DC Mini (1.83GHz), on a 1.66GHz Intel DC mini, and on 1.25/1.4GHz PPC minis, it uses the 'old-school' MAC address.

The new MacBook and all of the above machines were cloned from a test 1.83GHz Mini, and the 'new convention' ByHost naming affects only the MacBook. In fact, local and network user accounts on the new MacBook contain the old MAC address style, as well as 'new convention' ByHost files, so the OS is doing this based on the the HW platform it is running on:

H-TESTMACBOOK:ByHost expmac4@riverdale.edu$ ls -1
com.apple.Bluetooth.0016cbb031f4.plist
com.apple.Bluetooth.3AD3CA12-25BD-5683-B853-E78C39B862D4.plist
com.apple.iCal.helper.0016cbb031f4.plist
com.apple.iCal.helper.3AD3CA12-25BD-5683-B853-E78C39B862D4.plist
com.apple.iTunes.3AD3CA12-25BD-5683-B853-E78C39B862D4.plist
com.apple.scheduler.3AD3CA12-25BD-5683-B853-E78C39B862D4.plist
com.apple.syncservices.3AD3CA12-25BD-5683-B853-E78C39B862D4.plist
pbs.0016cbb031f4.plist
pbs.3AD3CA12-25BD-5683-B853-E78C39B862D4.plist


Because we have networked users at our site who will login to both 'old-school ByHost' desktop machines and 'new-convention ByHost' MacBooks, I will have to whip up some fancy ByHost renaming code in my loginhook script to handle both.

Does anybody have a list of the HW platforms on which the 'new-convention' ByHost take effect?

+-IconDaemon-+