[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Getting Hosts to work.



ons, 2003-01-01 kl. 01:36 skrev Jason C. Leach:

> I'm having some problems getting Hosts lookups to work.
> I am using Debian Linux.
> 
> In /etc/nsswitch.conf I have:
> hosts:          files ldap dns
> 
> And in /etc/libnss-ldap.conf I have:
> nss_base_hosts          ou=Hosts,dc=jsthrower,dc=com?one
> 
> But the queries don't even seem to get to the LDAP server. Things like
> ping just give me a segmentation fault.

What makes you think you can use ldap for this sort of thing? Did you
sort of work out for yourself that it must be possible?

When you ping a node, you ping its IP number. You have arranged it so,
that host names are translated to IP numbers. The translation is done by
a library called the resolver. In as much as one can use NIS tables for
storing both, your information is half correct.

host.example.com	172.16.1.132

99% of (Unix) network admins enter a DNS nameserver and their domain
name into /etc/resov.conf and a couple of relevant IP numbers into
/etc/hosts. They then use DNS for the dynamic resolution of every
possible IP number on their own networks and, if they are connected to
it, the Internet.One machine is the name server. Other machines use
their resolvers to query that nameserver. There is a well defined
mechanism for doing this and a couple of dedicated protocols.

You represent the remaining 1%. What you are attempting to do is replace
a NIS-based hosts database with an ldap based one. Its only possible
justification would be, if that were to use it as a single reference for
many hosts on a confined network, to make administration reasier. This
is how people did things in the 1980s, until confined networks became
today's Internet.

Today people use DNS. 

man hosts
cat /etc/hosts
cat /etc/resolv.conf
man resolver
http://www.isc.org/products/BIND/

Best,

Tony


-- 

Tony Earnshaw

When all's said and done ...
there's nothing left to say or do.

e-post:		tonni@billy.demon.nl
www:		http://www.billy.demon.nl