nsswitch.conf and host.conf differences
Have a network name resolution question.
What is the difference between the resolution name path in the /etc/host.conf and in the /etc/nsswitch.conf? I know nsswitch.conf, from my solaris days, and have never even used the host.conf. How can you have 2 different files for where to look for name resolution? |
nsswitch controls what methods are used to resolve the names. hosts contains the actual entries that will be read if nsswitch is set to resolve via hosts (i.e. "files" in nsswitch), as opposed to dns, nis
|
I think I see, but can you confirm this.
If I set my nsswitch.conf to hosts: files dns Then it looks to host.conf which reads order hosts,bind So could I take out dns in the nsswitch.conf since it is referenced in the host.conf? |
apologies i am a retard. i thought you meant /etc/hosts. now you've got me wondering too...
|
Did u googled for it. Google has almost every thing for u.
Here is solution for u, The host.conf file is one of the configuration files used to set the order of precedence among the various name services. The host.conf file defines serveral options that control how the /etc/hosts file is processed and how it interacts wi th DNS. The nsswitch.conf file handles much more than just the order of prec edence b/w the host table and DNS. It defines the sources for several different s ystem administration databases becz. it is an outgrowth of the NIS. The nsswitch.conf file has superseded the host.conf file becz. it provides more co ntrol over more resources. Linux systems generally have both files configured , bu t the action takes place in the nsswitch.conf file Now the difference, host.conf file is an older file used for order of precendece among various name services. whereas nsswitch.conf file is newer one as compared to host. conf file. host.conf is an old configuration file that does some of what nsswitch.conf does a nd is still in use. So, question is why host.conf file is present in system when nsswithc does everthing becz as of old architecture follows host.conf file , today also some system first looks for host.conf. For more info and clarity google for it. Source from where i am answering this is Craig Hunt book on DNS server. Above is all as far as i am remembering. -jack |
All times are GMT -5. The time now is 05:20 AM. |