We recently discovered that in OS X, a Computer's Name (set under sharing) may or may not equal it's hostname. Depending on the day the computer may decide to use the Computer Name you have given it or simply grab a name that's not currently in use on your network. This really isn't a good thing and was causing a number of issues for one of Viant's clients.
To resolve this issue, there are two or three locations you need to set the computer name. Depending on your network, it can be very important that the name is exactly the same in all three locations. First, set the computer name under System Preferences -> Sharing -> Computer name. Next, open terminal and set the hostname at /etc/hostconfig by adding the line:
HOSTNAME=ComputerName
If you need a vi cheat sheet check out http://www.shutterbug.com/equipmentreviews/accessories/0407powerlite/ or http://www.kcomputing.com/kcvi.pdf. Lastly, if you configured Active Directory integration ensure that your computer name is correct set under the Active Directory section of the Directory Access utility.
Even if Mac's random hostname selection isn't cause any issues on your network, it can be helpful to resolve this issue as it can make tracking network activity far more confusing when systems on your domain that you have control of are spoofing their hostname.