Can not setup open directory due to host name

In activing Open Directory on a new install of OS X, I am able to put in a diradmin name/password, and they I get the following dialog:

This computer's host name is invalid.

The host name does not resolve to any configured address of this computer. Please ensure the host name is correct.

I have checked

scutil --get ComputerName
scutil --get HostName
scutil --get LocalHostName

Each has returned what I expected (the machine name...the domain we are on, and the LocalHostName which matches the ComputerName.

My goal is to restore a backup of a live OD server to this one along with passwords.


Solution 1:

That "what I expected" part seems wrong.

LocalHostName + <your domain name> should equal HostName

so, if HostName is myserver and your domain is sample.com than LocalHostName should be "myserver" and HostName should be "myserver.sample.com".

In a terminal,

dig `scutil --get HostName` 

should return the IP adress of your server.