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

ProcedureHow to Revert to Maps Based on Current DIT Contents

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

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.

  2. Stop the NIS daemons.

    # svcadm disable network/nis/server:default
  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. Start the NIS daemons.

    # svcadm enable network/nis/server:default