Andrew Judge wrote:
----------------->>>>
nsswitch and hosts file?  nsswitch.conf tells the machine which order to
process name resolution.  Should it use local files first or nis or dns or
whatever?  nsswitch.conf makes the decision.
----------------->>>>

To test this out...

1. The local name server has the correct address for ilne.mln server.
2. So I put an entry into the /etc/hosts file with a wrong address for
ilne.mln.  
3. Tried ping ilne.mln and got a ping to the WRONG address.  
4. Changed:

/etc/host.conf
 **From** order hosts,bind
 **To**   order bind,hosts

5. Tried ping ilne.mln and got a ping to the WRONG address.  

6. Changed:

/etc/nsswitch.conf
 **From** hosts:   files nisplus dns
 **To**   hosts:   dns files nisplus

7. Tried ping ilne.mln and got a ping to the RIGHT address.  

8. Shutdown the local name server.

9. Tried ping ilne.mln and got a ping to the WRONG address.  

8. Started the local name server.

9. Tried ping ilne.mln and got a ping to the RIGHT address.
  
10. Put the correct address to ilne.mln into the /etc/hosts file.

The man pages of host.conf and nsswitch.conf point towards a level of
redundancy between what the two files are attempting to accomplish.  Where
host.conf was the first attempt to handle things and nsswitch.conf came
later and incorporated current resolver use (and code) in what it does.
Maybe host.conf is for backward compatibility.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to