![]() | ![]() |
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
This seems nonintuitive, since it means that if NIS is down, you won't be able to resolve hostnames and addresses. Let's suppose that you had the following in nsswitch.conf:hosts: files nis [UNAVAIL=return] dns
Now suppose gonzo is in NIS, and gonzo.sales.polygon.com is in DNS. Assume /etc/hosts.equiv contains an entry for gonzo. If you use rlogin to log in from gonzo to another machine, while NIS is up, then you will be able to log in without a password prompt. This is because when NIS is up, the IP address of gonzo is resolved by gethostbyaddr( ) to gonzo. When NIS is down, you will get a password prompt, because the IP address is resolved in DNS to gonzo.sales.polygon.com. A workaround would be to place both gonzo and gonzo.sales.polygon.com in the /etc/hosts.equiv file, but this is prone to error. Of course, if you do configure nsswitch.conf to return an error if NIS is down, then when NIS is down, you will not be able to access hostnames that are in a different DNS domain. For example:hosts: files nis dns
Not to belabor the point, but if NIS availability is a concern for you, and you are running DNS, then you will want to give serious consideration to not using the hosts map in nsswitch.conf:% telnet quote.triangle.com
hosts: dns
![]() | ![]() | ![]() |
5.2. Implementation | ![]() | 5.4. Centralized versus distributed management |
Copyright © 2002 O'Reilly & Associates. All rights reserved.