• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 478
  • Last Modified:

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.
0
myker
Asked:
myker
1 Solution
 
tfewsterCommented:
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.
0
 
ahoffmannCommented:
tfewster, must it be that hard? I'd do simply:
  1. Transfer all the /etc files like passwd, shadow, group, hosts etc. etc.
  2. ypinit -m
  3. configure as new NIS master, but don't start service (or disable network connection)
  4. shutdown NIS services on old master
  5. plug new master to net
  6. cross fingers ;-)
  7. cleanup on old master
0
 
tfewsterCommented:
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 ;-)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
yuzhCommented:
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:

http://www.experts-exchange.com/Operating_Systems/Solaris/Q_20522224.html

0
 
CleanupPingCommented:
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.
0
 
tfewsterCommented:
Poins to ahoffmann for the first good answer
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now