[techtalk] DNS & Linux

Melissa Plunkett mplunkett at tranquility.net
Fri Jun 2 22:13:24 EST 2000


I think I can help a bit with the nsswitch.conf vs hosts.conf question.
I run NIS and NFS on IRIX so it's a little different but not too much.  
A quick explaination of NIS (Network Information System)...NIS is a
service that allows you to make important information available to other
servers/workstations across a local network.  Example: the passwd file
should be accessable by all the hosts in a lab so that a person can 
change their password on one workstation and use it on all hosts in the
room, you use NIS to do this.  So basically nsswitch.conf tells NIS the
order to look for something when a certain service is looking for it. 
Example: the line
	hosts:      files dns nis nisplus
Would mean that when a service need a host name it would 
first look in the local files (/etc/hosts) then dns and then
the nis server maps for your domain.
On the other hand hosts.conf tells your computer where to look when it 
needs a host name/address.  So if hosts.conf contains:
	bind nis hosts
It would first look at the DNS for the name/address and if it didn't
find it there it would look in the nis maps and then finally the 
/etc/hosts file.

That's the best explaination I think I can give on an empty 
tummy :)  I hope that helps.

-Melissa

GeekGrrl wrote:
> 
> nsswitch.conf seems to be mostly used for NIS situations from what I have
> found. It is a slightly different critter then host.conf. You will
> probably have to ask someone else for more details on that as I do not run
> NIS.
> 
> On Fri, 2 Jun 2000, Stephanie Alarcon wrote:
> 
> > > You can do this on all Unices and Linux distros. Whether your host
> > > table or dns is looked at for resolution is specified in
> > > /etc/host.conf. It could be one, or the other, or both in various
> > > orders.
> >
> > hey, i didn't know that.  well then what about nsswitch.conf?  that has
> > this line, which i thought did what you described above.
> >
> > hosts:      files dns nis nisplus
> >
> > Does host.conf supercede it? is nsswitch.conf used for more complex
> > situations and hosts.conf for simple ones?
> >
> > thanks!
> > stephanie
> 
> _______________________________________________
> techtalk mailing list
> techtalk at linuxchix.org
> http://www.linux.org.uk/mailman/listinfo/techtalk





More information about the Techtalk mailing list