NIS uses a domain name setting, as does DNS. Where they pick up their domain name from can become confusing, so let's clarify that now. The DNS domain name is the one normally thought of as the "Internet domain name," while the NIS domain name is a token used to define the NIS boundaries. The two domains are treated as separate entities, and so they could both be set to the same value without any conflict. The way each name service determines its domain name is shown in Table 12.4. Table 12.4. Domain Name OrderingName Service | Meaning |
---|
NIS | Uses the value returned by domainname | DNS | Tries to use the variable LOCALDOMAIN Followed by the entry from /etc/resolv.conf Followed by the value returned by domainname Lastly, tries to determine the domain from the hosts entry | The way that many administrators split the two is to use the file /etc/defaultdomain to store the NIS domain entry and the file /etc/resolv.conf to store the DNS domain settings (we actually do this in Chapter 16, "Configuring DNS"), so we'll follow those conventions here too. The NIS domain name will be set to "nis.solarisbootcamp.com" using the following steps. This will ensure it remains set for both the current session and any subsequent reboots: tin# domainname nis.solarisbootcamp.com tin# domainname > /etc/defaultdomain tin# domainname nis.solarisbootcamp.com tin# |