SUMMARY: NIS (SunOS 4.1.3) three little questions

From: Beppe.Coffano@its.it
Date: Thu Oct 27 1994 - 05:04:07 CDT


Hallo sun-managers,

I posted three questions about NIS on SunOS 4.1.3.
After each question you can find a summary of the received answers.

> 1)Until now I have been told the following :
> IF
> you have only one workstation (let say WS_A) into a network
> different from the NIS master's network
> THEN
> WS_A MUST be a NIS slave server
> END IF
> Is it true ?
No, it's not true. If you use:
               ypbind -ypset
               /usr/etc/yp/ypset your_nis_master
then you don't need the slave server.
Be careful to indicate the machine a route to the nis_master's network (for example with route add ...) before ypset your_nis_master has been executed.
Following that suggestion everything works well.

> 2) At the moment WS_A is set as slave server.
> Why a PC, (with Pcnfs 5.0 configured with NIS), that resides on the NIS
> master's network, always chooses WS_A (on a different network) as its NIS server ?
It seems to be due to a static routing Pcnfs command on the PC :
net route <WS_A> <router>
Removing it everything works fine : always the PC chooses a NIS server on its same network.

> 3) According to Stern's "Managing NFS and NIS" (O'Reilly), on page 25, I added
> the new slave server (WS_A) into the ypservers map on the NIS master, using the
> following commands :
> ypcat -k ypservers > /tmp/ypservers
> (edited /tmp/ypservers to add WS_A)
> cd /var/yp
> cat /tmp/ypservers | makedbm - /var/yp/`domainname`/ypservers
> Now, giving "ypcat -k ypservers" again, I should see WS_A at the end (or beginning) of the map.
> I don't see it. Why ?
The answer is not so well defined. In any case these are the opinions :
- ypcat doesn't find the new entry because the NIS map is cached and the NIS master is bind to the NIS slave
- To add a new server correctly you should kill the yp processes on the master, then rerun ypinit. It will create the ypservers itself. After the masters yp processes are back up and running, then run ypinit on the new server.
[I tried it : it isn't always successfull.]
- You should also update the ypslaves.mastername map. It works the same
way as ypservers, but doesn't list the master server in the map.

Many thanks to :

Dan Stromberg stromberg@uci.edu
John Malick johnm@sse.com
Pamela Pledger pamela@legato.com
Rich Holland holland@engg.ksu.edu
Torsten Metzner tom@uni-paderborn.de
Eckhard Rueggeberg eckhard.rueggeberg@ts.go.dlr.de
Don Lewis gdonl@gv.ssi1.com

C I A O ! [a little bit of Italian :-)]
Beppe
                                 \\\|///
                                \\ ~ ~ //
                                (/ @ @ /)
    +-------------------------oOOo-(_)-oOOo-----------------------------+
    | Beppe Coffano |
    | Torino Italy | Learning is a treasure |
    | voice : +39 11 6852351 | which accompanies its |
    | fax : +39 11 6853088 | owner everywhere. |
    | e-mail : beppe.coffano@its.it | anonymous |
    +-------------------------------------------------------------------+



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:13 CDT