1820886 Members
3822 Online
109628 Solutions
New Discussion юеВ

Remove NIS Slave

 
SOLVED
Go to solution
brian_31
Super Advisor

Remove NIS Slave

Could someone tell the correct procedure for removing the NIS Slave from the master?

Thanks

Brian.
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Remove NIS Slave

On the old slave server:
/sbin/init.d/nis.server stop
edit /etc/rc.config.d/namesvrs and set NIS_SLAVE_SERVER=0

cd /var/yp
and remove all the files.

On the NIS master:

cd /var/yp
ypcat -k ypservers | grep -v old_slave_server_hostname | makedbm - /var/yp/'mydomainname'/ypservers

The grep -v will remove the old_slave_server_hostname from the ypservers list and we will use the remaining hostnames to rebuild the ypservers map.

That should fix you.
If it ain't broke, I can fix that.
brian_31
Super Advisor

Re: Remove NIS Slave

Sir:

That was perfect. Could you explain it please? Is this the only way? What i did was the same except i did edit the file nis-serverlist (list of all servers) and then did the makedbm -u ypservers > nis-server-list.

Thanks

Brian
A. Clay Stephenson
Acclaimed Contributor

Re: Remove NIS Slave

Your approach was equivalent. Mine was simply more automated. Never do manually what you can do with a one-liner; that's just basic UNIX.
If it ain't broke, I can fix that.
G. Vrijhoeven
Honored Contributor

Re: Remove NIS Slave

Hi Brian,

What you could do is update the securenets and secureservers file in /var/yp by deleting the ip-address of the nis slave.

Regards,

Gideon