I'm not looking for actual tools or techical how to type answers here. I'm in a complex networking environment, and I'm trying to understand the constraints on my choice of a hostname / domain / DNS service for my host.

I'm running a debian system in an environment where most people run corporate windows boxes that are "managed" by it. There appear to be several domains around.

I would like to know what constraints should be informing my choice of which domain to particpate in, what hostname I can choose, etc?

Note, the DNS that is configured if I use DHCP is NOT accessible to me. However, I have access to a different DNS that I can add records to myself. If this matters . . .

  • 1
    That's probably a little bit too specific to your individual use case for people to offer general advice on. You can specify multiple SEARCH domains in the order that they're most likely to come up in. Usually, when people are following a hub and spoke model where the spokes are in different domains the admin will put the "hub" (this server, I guess) in the immediately higher level domain. For instance if machines in the a.example.com and b.example.com subdomains are managed by a single server, usually you would put it underneath example.com – Bratchley Jul 18 '13 at 15:18
  • 1
    This is just because apparently it's too generic to qualify for whatever determines what gets put into the two subdomains (e.g: if machines in hr.example.com and accounts.example.com use it, it must be generic to example.com computers so that's where you put it). But individual mileage may vary and a lot of this is preference and what happens to be common practice where you work. – Bratchley Jul 18 '13 at 15:19
  • Sorry for the wordy comments, btw. Just trying to make sure I explain it properly. – Bratchley Jul 18 '13 at 15:21


Generally your hostname shouldn't matter. The only time that there could be an issue is if 2 hosts are attempting to use the same hostname AND the DHCP server is configured to "manage" the adding of system hostnames to the DNS server as it (DHCP) delves out IP addresses to new hosts.

This particular features is often deployed in enterprise environments to cut down on the management effort for name resolutions.


Again in Unix the hostname doesn't really matter. It's more of an issue when the computer is attempting to interact with servers such as Apache or Samba which may have explicit allow/deny lists based on a computers domainname that's reporting to as part of any access it's attempting to do against said server.

The domainname used for doing DNS queries is typically a different configuration item than the domainname that's setup on a Unix system.

For example, my laptop is currently setup to do searching using this domain "mydom.com" through the /etc/resolv.conf file.

# Generated by NetworkManager
domain mydom.com
search mydom.com

However my laptop's hostname/domainname is as follows:

$ hostname --short

$ hostname --fqdn
hostname: Name or service not known
$ hostname --domain
hostname: Name or service not known

As you can see my laptop's hostname is "grinchy" but it's fully qualified domainname (fqdn) is unset as well as its domainname.

DNS domain & search

These 2 features of DNS name resolution are really the primary 2 things that can make your Unix system co-exist fairly painlessly within a Windows environment.

Typically by paying special attention to these 2 parameters, you can significantly cut down on your frustration level so that accessing internal systems only requires the use of their hostname.

Window's Name Resolution

There is one additional piece of technology which can also make it less painful when adding a Unix system into a Windows enterprise environment. Turning on the nmbd daemon which is part of the Samba project can help in the resolving of Windows hostnames which may not have a corresponding entry in your environment's DNS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.