Fixing .localhost computer names in Casper...

This was a few days work for me and I’m super happy about it.

Issue: The latest version of Casper and the latest OSX have something in them as a conflict. Whenever the computer changes network interfaces, the computer name changes  to .localhost. I was able to duplicate it on a computer with just the OS, a directory binding and Casper. The issue did not appear until after installing Casper on the computer. Here is how I fixed it:

1. I wrote a small script that pulled the Casper computer name and wrote it into every spot in OSX that wanted a name and set the hostname of the computer. This also wrote a small file with the computer name in it into a flat file so I could refer to it later if I needed.

The script is here: https://github.com/matthewbodaly/rawrscripts/blob/master/computernameninja.sh

2. Instead of binding to just domaincontroller.lan, I bound the computer to a preferred domain controller. Instead of just joining the domain, I opened the directory utility and here is what the advanced settings looked like. I filled these out BEFORE binding. Once I had it tested, I created a new binding policy on Casper and did an unbind rebind on the computers.

[

3. Set the delay to show loginwindow on the computer at 45 seconds. I dont think this is as important as the other two but this gave the ethernet interface more time to authenticate on our network. Since we have primarily network users, this made sense for our environment. More information on that was found here : https://discussions.apple.com/thread/4286854?start=0&tstart=0

Looking back on this, I’m likely going to change the login window delay to a bit longer on our network, but I deployed this in stages and this has completely resolved the issue to this point.