[techtalk] localhost, etc.

Wendt,Andrew awendt at neo.rr.com
Mon Oct 18 20:22:47 EST 1999


On Mon, 18 Oct 1999, you wrote:
>host.conf : 
>
>order hosts, bind
>means search /etc/hosts first to resolve host names, then search dns. 
>Name servers are configured in /etc/resolv.conf, if you don't have anything set up for a dns server, you can remove bind from host.conf.

Then what is /etc/nsswitch.conf for?

Jeff's strace seems to indicate that file is used for this purpose, not the
/etc/host.conf...

>>>> Jeff Dike <jdike at karaya.com> 10/16 8:04 PM >>>
>> I wonder how /etc/host.conf differs from /etc/nsswitch.conf. I have
>> both files, and they both seem to set the search order...
>
>You're right.  I've got no idea what host.conf is for.  nsswitch.conf is 
>definitely the one being used:
>
>% strace ping mv.mv.com
>...
>oopen("/etc/nsswitch.conf", O_RDONLY)    = 4
>fstat(4, {st_mode=0, st_size=0, ...})   = 0
>mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
>0x40014000
>read(4, "#\n# /etc/nsswitch.conf\n#\n# An"..., 4096) = 1542

************
techtalk at linuxchix.org   http://www.linuxchix.org




More information about the Techtalk mailing list