Operating System - HP-UX
1832670 Members
3572 Online
110043 Solutions
New Discussion

How to remove a slave server from ypcat -k ypservers list ?

 
SOLVED
Go to solution
Sammy_2
Super Advisor

How to remove a slave server from ypcat -k ypservers list ?

This is NIS. Do I need to recreate NIS dbase with "ypinit -m" on the master server and not include the server name ???
The server in question no longer exist.
Thanks
good judgement comes from experience and experience comes from bad judgement.
8 REPLIES 8
S.K. Chan
Honored Contributor
Solution

Re: How to remove a slave server from ypcat -k ypservers list ?

No need to recreate the NIS database .. on the master server do this ..
# cd /var/yp/
# makedbm -u ypservers >> ../nis-server-list
# vi ../nis-server-list
==> Delete the hostname of the unwanted server.
# makedbm ../nis-server-list ypservers
# /var/yp/ypmake
==> That should push/update the new ypservers map out to the rest of the slaves. Check on the slaves side just to make sure /var/yp//ypservers.dir and /var/yp//ypservers.pag are updated.

FYI you can also (instead of running ypmake) run ..
# yppush -v ypservers
Caesar_3
Esteemed Contributor

Re: How to remove a slave server from ypcat -k ypservers list ?

Hello!

As mr. Chan wrote or you can made ypinit for
the server and give the new list.

Caesar
Sammy_2
Super Advisor

Re: How to remove a slave server from ypcat -k ypservers list ?

Thanks Chan,
Works like a charm. But how come when I do a "ypcat -k ypservers" on master server, I do not see the deleted server (as it should). But on slave server, the same command show the old server name.Anyway, your answers was worth 10 points.
Thannks
good judgement comes from experience and experience comes from bad judgement.
Sammy_2
Super Advisor

Re: How to remove a slave server from ypcat -k ypservers list ?

Thanks Chan,
Works like a charm. But how come when I do a "ypcat -k ypservers" on master server, I do not see the deleted server (as it should). But on slave server, the same command show the old server name.Any ideas ???Anyway, your answers was worth 10 points.
Thannks
good judgement comes from experience and experience comes from bad judgement.
Sammy_2
Super Advisor

Re: How to remove a slave server from ypcat -k ypservers list ?

User(me ) Error. I did no do the last command that Chan mentioned "yppush". Now I see all in sync.
Thanks indeed.
Sam
good judgement comes from experience and experience comes from bad judgement.
S.K. Chan
Honored Contributor

Re: How to remove a slave server from ypcat -k ypservers list ?

Hi Sam,
Did you verify (on the slave side) that /var/yp//ypservers.dir and ypservers.pag file got updated ? The timestamp will tell you. If they do not get updated, there has got to be some problem with the ypmake. Try this .. on the master side , run
$ yppush -v ypservers
anyway to copy the ypservers db map and see if that works for you.
Sammy_2
Super Advisor

Re: How to remove a slave server from ypcat -k ypservers list ?

Chan,
I had to yppush to make it work. And dates on the slaves are current now
Thanks a bunch.
good judgement comes from experience and experience comes from bad judgement.
S.K. Chan
Honored Contributor

Re: How to remove a slave server from ypcat -k ypservers list ?

I did some check for you .. it seems ypmake does not push out ypservers map (just look at the ypmake script in /var/yp). That confirms that yppush needs to be run manually for the update to happen.