[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NIS question: ypserver=localhost in yp.conf on slave NIS?



"Ralf G. R. Bergs" wrote:

> step that is NOT contained in the howto.

can't cover all possibilities

> Whenever my master server was unreachable the slave server couldn't read the
> passwd map. So I entered "ypserver localhost" in /etc/yp.conf, et voila,
> things worked again.

so your localhost is the second nis server, isn't it?

> Is this The Right Thing(TM) to do? Or why didn't the library functions on
> the slave server machine automatically use the slave NIS instead of the
> master NIS server after the disappearance of the master server was detected?

nis is a service. it gets served by a daemon for who ever calls it. if
you set up the daemon to server, you haven't set implicitly any client
to call.  usually ypbind is used to bind ("connect") to the server, and
when you actually call any nis-info (let say a passwd entry) your system
looks how to get it (nsswitch.conf) and then looks which ypserver serves
this info (i.e. the one ypbind is bound to) and makes the call. when the
server bound to is gone, then ypbind acts as configured (see man
ypbind). debian asks which is your ypserver during installation of nis
package. and this gets noted in yp.conf. all you can put in there is
documented in man yp.conf. and putting "ypserver hostname" in there is
just right for multiple servers in one nis-domain. when ypbind takes
notice of a gone (or bad to reach) ypserver it binds to the recently
best one to reach, as configured in yp.conf. (it could be done by
broadcasts also, but that's usually no good choice). 

gerhard


Reply to: