System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)

Reverting to NIS

It is anticipated that a site that has transitioned from NIS to LDAP using the N2L service will gradually replace all NIS clients with Solaris LDAP naming services clients. Support for NIS clients eventually becomes redundant. However, if required, the N2L service provides two ways to return to traditional NIS, as explained in the next two procedures.


Tip –

Traditional NIS ignores the N2L versions of the NIS maps if those maps are present. After reverting to NIS, if you leave the N2L versions of the maps on the server, the N2L maps do not cause problems. Therefore, it might be useful to keep the N2L maps in case you later decide to re-enable N2L. However, the maps do take up disk space.


How to Revert to Maps Based on Old Source Files
  1. Become superuser.

  2. Stop the NIS daemons.


    # ypstop
    
  3. Disable N2L.

    This command backs up and moves the N2L mapping file.


    # mv /var/yp/NISLDAPmapping backup_filename
    
  4. Set the NOPUSH environment variable so the new maps are not pushed by ypmake.


    # NOPUSH=1
    
  5. Make a new set of NIS maps that are based on the old sources.


    # cd /var/yp
    # make
    
  6. (Optional) Remove N2L versions of the NIS maps.


    # rm /var/yp/domainname/LDAP_*
    
  7. Restart the NIS daemons.


    # ypstart
    
How to Revert to Maps Based on Current DIT Contents

Back up the old NIS source files before performing this procedure.

  1. Become superuser.

  2. Stop the NIS daemons.


    # ypstop
    
  3. Update the maps from the DIT.


    # ypserv -r
    

    Wait for ypserv to exit.

  4. Disable N2L.

    This command backs up and moves the N2L mapping file.


    # mv /var/yp/NISLDAPmapping backup_filename
    
  5. Regenerate the NIS source files.


    # ypmap2src
    
  6. Manually check that regenerated NIS source files have the correct content and structure.

  7. Move the regenerated NIS source files to the appropriate directories.

  8. (Optional) Remove the N2L versions of the mapping files.


    # rm /var/yp/domainname/LDAP_*
    
  9. Restart the NIS daemons.


    # ypstart