Operating System - Linux
1748274 Members
3888 Online
108761 Solutions
New Discussion юеВ

Re: How to export /etc/hosts (host entries) to NIS server and how to ping the hostname from NIS clients

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

How to export /etc/hosts (host entries) to NIS server and how to ping the hostname from NIS clients

Hi All,

I have configured NIS server in suse linux.

Now I would like to export /etc/hosts (all host entries) to NIS server and want to ping from NIS client with out configuring DNS...How to achieve this...
3 REPLIES 3
Alzhy
Honored Contributor
Solution

Re: How to export /etc/hosts (host entries) to NIS server and how to ping the hostname from NIS clients

If you already have NIS setup in your domain:

nisaddent

If your starting from scratch and want to know the HOWTOs of NIS (formerly called yellow pages) -- employ Goodgle.. lots of good refernces out there. My favourites:

Generic:
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch30_:_Configuring_NIS

http://www.labtestproject.com/linnet/nis-nfs.html
Hakuna Matata.
Steven Schweda
Honored Contributor

Re: How to export /etc/hosts (host entries) to NIS server and how to ping the hostname from NIS clients

> I have configured NIS server in suse linux.

As usual, showing actual commands with their
actual output can be more helpful than vague
descriptions or interpretations.

> Now I would like to export /etc/hosts (all
> host entries) to NIS server [...]

What, exactly, does that mean? I've never
used NIS on SUSE, so I know nothing, but I'd
expect there to be some file like
"/var/yp/Makefile", which should determine
which source files are used to populate the
NIS data base. Knowing nothing, I'd expect
"/etc/hosts" to be used for the "hosts" data.

On the NIS server:

grep -i hosts /var/yp/Makefile
ypcat hosts

> [...] want to ping from NIS client with out
> configuring DNS

What, exactly, does that mean? Do you want
an NIS client to use NIS for name resolution?

man nsswitch.conf
Viktor Balogh
Honored Contributor

Re: How to export /etc/hosts (host entries) to NIS server and how to ping the hostname from NIS clients

>want to ping from NIS client with out configuring DNS

then set your nsswitch.conf to the following:

# grep hosts /etc/nsswitch.conf
hosts: files nis
#

****
Unix operates with beer.