5.3. Fully qualified and unqualified hostnamesDNS and NIS have different semantics when it comes to dealing with qualified and unqualified hostnames. A fully qualified hostname is one that includes the DNS domain name as the suffix, whereas the unqualified hostname does not have a domain suffix. So for example, gonzo.sales.polygon.com is a fully qualified DNS name, but gonzo is an unqualified name. With both DNS and NIS, there is associated with the name service configuration a default domain name. If an unqualified hostname is passed to gethostbyname( ) to be resolved, then both DNS and NIS will associate the query with the default domain name. When doing an address to name query, such as via gethostbyaddr( ), DNS and NIS behave differently. DNS will always return the fully qualified hostname, whereas NIS may return the unqualified hostname. You can do one of two things to address this issue:
If DNS is being used, NFS client gonzo will be denied access. This is because if DNS is being used to resolve hostnames to IP addresses, it is also being used to resolve IP addresses to hostnames, and DNS always generates fully qualified hostnames. Thus if gonzo is in the sales.polygon.com domain, then the following gives gonzo access:share -o rw=gonzo /export
The qualified versus unqualified hostname issue is one that has the potential for causing you major grief, and at the end of the day, you may decide that it is far simpler to use DNS across the board. If you do opt to use both NIS and DNS, for consistent results, the following is recommended:share -o rw=gonzo.sales.polygon.com /export
Copyright © 2002 O'Reilly & Associates. All rights reserved.