Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I need to take down my current NIS master server because it is running on RHEL 4 which is too old for the auditors to approve now.

I think I need to copy some files off the master over to a slave server and run make?

I know there are files listed in the makefile but which ones are necessary for this and which ones should be left alone?

The slave server is running Ubuntu 12.04.

share|improve this question
1  
Nis is also really old fashioned. Why not join us in the 21st century and use ldap instead? –  Dennis Kaarsemaker Apr 28 '13 at 20:50
    
@DennisKaarsemaker has a point - particularly if your concern is site audits, LDAP is superior to NIS in most respects. For now grs' outline below should get you migrated to a modern OS, but Long-Term you should be looking to migrate off of NIS... –  voretaq7 Apr 29 '13 at 15:32
    
LOL that is the goal. I had to get the current NIS down quick and just need this in a VM while i get LDAP up. Most likely my next question on here will be a good script to migrate the users over. Or if one exists anyway. This is for a university. A place where you'll find NIS :/ –  RonFish Apr 29 '13 at 19:56

1 Answer 1

up vote 5 down vote accepted
  1. Let's assume that the domain configuration is under /var/yp/<domainname>;
  2. Let's assume the NIS server configuration is under /var/yp;
  3. Let's assume you have some NIS related configuration files under /etc/ as well. Those could be /etc/yp.conf, /etc/ypserv.conf, /etc/ypserv.securenets and possible others (their filenames usually begin with yp....

What you need to do in order to move your NIS to the new server:

  1. Copy all of these files from the old server to the new one. Make sure they are not existent there beforehand or if they are - take backups before overwriting them!

  2. Decide if the new server will have the same hostname and IP address as the original master.
    If the name is the same you would skip the clients reconfiguration, otherwise it will be necessary to point to the right server (host or IP). I would rather reconfigure the clients

  3. Copy the passwords, groups, shadow files from the old server to the new one

  4. Once you have all files on the new server, run make -C /var/yp
    You may need to stop the NIS service on the old server, as the domains are to be the same and can't have two master servers. If no errors - continue with following steps. Otherwise - well ... troubleshoot.

  5. Run ypwhich on the new server and verify it returns its own hostname

  6. Run ypcat passwd | grep <username>, ypcat group | grep <groupname>
    Verify this works as expected;

  7. Stop the NIS service on the old server, if not done earlier

  8. Reconfigure all NIS clients
    Change their /etc/yp.conf to point to the respective server:
    echo -e "ypserver new_NIS_server" >> /etc/yp.conf.
    (alternatively this is where you would give the new machine the old one's IP/Hostname).

Good luck!

share|improve this answer
    
That's pretty comprehensive. Note that if you're one of the few places that's still using broadcast to determine NIS servers you might not need to do step 8. –  voretaq7 Apr 29 '13 at 15:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.