Nathan Moore wrote:
> Is there a way to share a hosts list via NIS? Are there any
> advantages to this over DNS or /etc/hosts? I'm running NIS, DNS, and
> home directory shares all off of one server (honker in the examples,
> 10.30.27.5 <http://10.30.27.5>)
>
Sorry for the late reply, been busy & trying to catch up on my email...
You have a few choices of host name resolvers on Linux, /etc/hosts is
simplest but quickly becomes difficult to manage on networks with more
than a dozen hosts.
Setting the Linux Host Name
http://www.cpqlinux.com/hostname.html
NIS is next and adds a level of complexity to the network configs, but
helps manage the configs across a small subnet. Try 'ypcat hosts.byname'
& see what you get...
NIS is dependent on NFS services and NIS uses database files called
'maps' to determine what network configs can be managed centrally by
NIS, also it puts a "+:" at the end of the master map files like
/etc/passwd to indicate when clients are using NIS. The NIS maps for
resolving names are called hosts.byname and hosts.byaddr. The advantage
of using NIS is it centrally manages some network config files and
handles custom name resolver lookups quicker than DNS. The old way was
to write simple scripts that copy configs like /etc/passwd, /etc/hosts
and resolver.conf to other systems on the network. NIS does this
somewhat automatically and can provide some redundancy so map files can
be replicated on NIS master & slave servers for private networks (behind
firewalls). The yp commands manage NIS and map files, so to push the
maps to the other NIS servers you run ypmake. There are some security
concerns to be aware of when deploying NIS...
NAGv2 - The Network Information System - NIS
http://tldp.org/LDP/nag2/x-087-2-nis.html - http://tldp.org/guides.html
NIS : Linux central authentication
http://www.yolinux.com/TUTORIALS/NIS.html
Quick HOWTO- Configuring NIS
http://www.linuxhomenetworking.com/linux-adv/nis.htm
RHEL-4 Security Guide - Securing NIS
https://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/en-US/Security_Guide/s1-server-nis.html
Services like Bind/DNS, LDAP and OpenAFS offer more modern methods of
handling resolvers and distributing hostname maps, but are quite a bit
more complex than NIS services. So it depends on the size of your
network and how difficult it is to manage and whether you need Files
(/etc/hosts), NIS, DNS or some more advance services like LDAP within
your own subnet.
RHEL-4 Reference Guide - Bind DNS
https://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/en-US/Reference_Guide/ch-bind.html
-HTH Art@JAX
> On 8/12/07, *Nathan Moore* <[log in to unmask]
> <mailto:[log in to unmask]>> wrote:
>
> Thanks for the pointer! This solved the problem,
>
> [root@toulouse ~]# cat /etc/nsswitch.conf
> #
> # /etc/nsswitch.conf
> #
> # An example Name Service Switch config file. This file should be
> # sorted with the most-used services at the beginning.
> ...
> #hosts: db files nisplus nis dns
> # hosts: files nis dns this was the original version
> hosts: dns files nis
>
> When I changed the order of the hosts entry, the name lookup
> worked. I suppose the other route would be to have a long
> /etc/hosts file on each machine that defines the names of all nodes.
>
> I'm still confused about the contents of /etc/hosts though. Any
> ideas?
>
> Nathan
>
>
>
>
> On 8/11/07, *Miles O'Neal* < [log in to unmask]
> <mailto:[log in to unmask]>> wrote:
>
> Nathan Moore said...
>
> |[root@buff ~]# cat /etc/hosts
> |# Do not remove the following line, or various programs
> |# that require network functionality will fail.
> |127.0.0.1 buff localhost.localdomain localhost
> |::1 localhost6.localdomain6 localhost6
> |
> |Can someone explain what the "localhost6" does?
>
> I'm guessing from the format and that the line contains three
> sixes (666!) that it's IPV6 stuff.
>
> Which doresn't help with your other problem.
>
> What is your nsswitch.conf entry for hosts?
> Does NIS or LDAP factor in?
>
>
>
>
> --
> - - - - - - - - - - - - - - - - - - - - -
> Nathan Moore
> Assistant Professor, Physics
> Winona State University
> AIM: nmoorewsu
> - - - - - - - - - - - - - - - - - - - - -
>
>
>
>
> --
> - - - - - - - - - - - - - - - - - - - - -
> Nathan Moore
> Assistant Professor, Physics
> Winona State University
> AIM: nmoorewsu
> - - - - - - - - - - - - - - - - - - - - -
|