Link to home
Start Free TrialLog in
Avatar of myker
myker

asked on

Changing the NIS master server

I have one nis master and one slave with a few clients.  I want to change my master to a different machine and then make the current master just a client. I'm looking for the easiest way to do this?? These machines are running solaris 2.8.Thanks.
Avatar of tfewster
tfewster
Flag of United Kingdom of Great Britain and Northern Ireland image

This isn't the easiest way, but allows to to test & back out at each stage.

Create a new NIS domain. On the new NIS master:
1. Transfer all the /etc files like passwd, shadow, group, hosts aso from the old master.
2. Change the domainname ("domainname new_domain" + change /etc/defaultdomain)
3. rm /var/yp/binding/*
4. Remove the last two lines in /var/yp/aliases
domainname domainname
ypservers ypservers
5. ypinit -m
6. reboot
Now the new NIS master should bind to itseflf. Test that everything works before you go on with the next machine.

The next steps should be repeated on all the other, none NIS server, machines
1. Do the steps 2-4 above
2. reboot


On the old NIS servers you also need to "rm /var/yp/olddomainname"

The machines will use the old NIS server until they're rebooted.
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ahoffmann, that's certainly MUCH easier on a large network; As myker said there were only a few clients, I tried to avoid your step 6 ;-)
Avatar of yuzh
yuzh

ahoffmann and tfewster's suggestion will work for you.

Here's my way to do the job:
(no interrupt to the network operations, no change to the clients).

Let's say box-A is your old NIS master, and you want to make box-B as the new master, if the two boxes have identical hardware. You can simply keep your slave server running and swap the harddisk between the two boxes, that means that you swap the hostname and ip for the boxes as well, and all the client boxes can leave unchange.

If the two boxes have different hardware, you need to do a bit more.

Perform Full system backup for the two boxes. put box-B off the network and restore box-A's backup to box-B, (connet to a hup but no connetion to the network),and run an upgrade install (use Solaris 8) to fix up all the device drivers. then shultdown box-A, connet box-B back to the network, and boot it up. do the same thing to box-A.(box-A get box-B's backup, the run upgrade install).

You might want to have a look at my comments in the following question:

https://www.experts-exchange.com/questions/20522224/Changing-IP-Address-on-NIS-Server-Sol-2-5.html

myker:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
Poins to ahoffmann for the first good answer