Casper Imaging - MAC Address Naming

Kennedy
New Contributor II

Hi all,

Forgive me if this has already been covered - I have searched high and low.

We are running Casper Imaging 9.21 on a 10.9 NetBoot image. When we image a MacBook Air over Thunderbolt to Ethernet adapter (which has been specified in JSS as a removable MAC Address) and try to name the machine quickly as the MAC Address, it picks the Thunderbolt to Ethernet adapter's MAC Address instead of the Wifi MAC Address.

Is this by design? Am I missing something simple?

We have a significant number of machines that require imaging soon and don't really want to go into network settings and copy and paste each Wifi MAC Address into the computer name field.

Perhaps I need to submit a feature request to give you the choice of MAC Address in Casper Imaging, unless this has already been covered.

Cheers,
Gavin

1 ACCEPTED SOLUTION

stevewood
Honored Contributor II
Honored Contributor II

Yes, I believe by design it takes the MAC address of the active connection you are imaging over. You can get around this by re-naming the computer in a first boot script. You can grab the MAC of the wi-fi port in a script like this:

wifiMAC=`networksetup -listallhardwareports | awk '/Hardware Port: Wi-Fi/,/Ethernet/' | awk 'NR==3' | cut -d " " -f 3 | sed s/://g`

That is for 10.7 and above. Then you can re-name the computer with this:

jamf setComputerName $wifiMAC
jamf recon

That 'jamf recon' maybe overkill, I cannot remember if the setComputerName verb forces a recon or not.

View solution in original post

3 REPLIES 3

stevewood
Honored Contributor II
Honored Contributor II

Yes, I believe by design it takes the MAC address of the active connection you are imaging over. You can get around this by re-naming the computer in a first boot script. You can grab the MAC of the wi-fi port in a script like this:

wifiMAC=`networksetup -listallhardwareports | awk '/Hardware Port: Wi-Fi/,/Ethernet/' | awk 'NR==3' | cut -d " " -f 3 | sed s/://g`

That is for 10.7 and above. Then you can re-name the computer with this:

jamf setComputerName $wifiMAC
jamf recon

That 'jamf recon' maybe overkill, I cannot remember if the setComputerName verb forces a recon or not.

Kennedy
New Contributor II

Thanks!

Kind of embarrassed I didn't think of that myself!

I still think that Casper Imaging giving you the choice wouldn't hurt, to save running scripts etc.

Without testing this tomorrow, I wonder how this would work with Autorun data and the computer name?

Cheers,
Gavin

stevewood
Honored Contributor II
Honored Contributor II

You mean would the Autorun data move with the computer name? Yes, it would since all you are doing is renaming the database record, so to speak. You are not creating a new machine record in the JSS, so all of the Autorun data will move over.

If you want the choice, make sure you put it in as a Feature Request here on the site.