Changing DNS hostname on OSX Server


If you ever need to check the DNS hostname under OSX server here is the command:

$ sudo changeip -checkhostname
If you need to change it (ie: after a DNS table change) use the following command (for OD sites):
changeip /LDAPv3/127.0.0.1/ 192.0.0.12 192.0.0.12 old.example.com new.example.com
changeip also has a lot of other uses (ie: if you change the ip address of your machine you can use changeip to change the setting in the directory as well). Have a look at the man pages for more info.

If you’re having trouble kerberizing your Open Directory under OSX server then you are also most likely having hostname problems. Run the first command to check the hostname information and make sure “Current Hostname” and “DNS Hostname” in it’s output match. If they don’t use the second command to change (fix) it (assuming your DNS is working properly). Then you can go to Server Admin and under Open Directory/Settings press the Kerberize button that Pops up on the lower left.

, , , ,

3 responses to “Changing DNS hostname on OSX Server”

  1. Thanks for this, we have been plagued with this issue for a year or two and the only real fix in ,until now, has been to format and reinstall.

  2. yep, Id agree with this… once you have DNS issues on OS X server, sometimes its quicker to back everything up, do a clean install and migrate everything back. I suppose it depends on your experience.

Leave a Reply