Go to main content

Working With Oracle® Solaris 11.3 Directory and Naming Services: DNS and NIS

Exit Print View

Updated: October 2017
 
 

How to Prepare Source Files for Conversion

This procedure explains how to prepare the source files for conversion to NIS maps.

  1. Become an administrator.

    For more information about obtaining the appropriate rights to perform specific tasks, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.

  2. Check the source files on the master server to make sure that they reflect your system.

    Check the following files:

    • audit_user

    • auth_attr

    • auto.home or auto_home

    • auto.master or auto_master

    • bootparams

    • ethers

    • exec_attr

    • group

    • hosts

    • ipnodes

    • netgroup

    • netmasks

    • networks

    • passwd

    • protocols

    • rpc

    • service

    • shadow

    • user_attr

  3. Copy all of these source files, except for passwd and shadow, to the source directory that you have selected.

    The source directory is defined in /var/yp/Makefile by the DIR macro.

  4. Copy the passwd and shadow files to the password source directory that you have selected.

    The password source directory is defined in the Makefile by the PWDIR macro.

  5. Copy the audit_user, auth_attr, exec_attr, and prof_attr files to the rights source directory that you have selected.

    The rights source directory is defined in /var/yp/Makefile by the RBACDIR macro. If desired, merge the contents of the files in the /etc/security/auth_attr.d directory into a copy of the auth_attr file before copying it. Similarly, combine the files in the exec_attr.d and prof_attr.d directories with exec_attr and prof_attr, if desired.


    Caution

    Caution  -  Because these files will need to be remerged any time the system is upgraded, keep the local files separate from the release files in the/etc/security/*.d directories.


  6. Check the /etc/mail/aliases file.

    Unlike other source files, the /etc/mail/aliases file cannot be moved to another directory. This file must reside in the /etc/mail directory. Refer to the aliases(4) man page for more information.


    Note -  You can add an NIS-specific mail aliases file by pointing the ALIASES = /etc/mail/aliases entry in /var/yp/Makefile to another location. When you then run the make command, the ALIASES entry creates a mail.aliases map. The sendmail service uses this map in addition to the /etc/mail/aliases file when the /etc/nsswitch.conf file properly targets nis in addition to files. Refer to Modifying and Using /var/yp/Makefile.
  7. Clean all comments and other extraneous lines and information from the source files.

    These operations can be done through a sed or awk script or with a text editor. /var/yp/Makefile performs some file cleaning automatically for you, but it is good practice to manually examine and clean these files before running the make command.

  8. Make sure that the data in all the source files is correctly formatted.

    Source file data must be in the correct format for that particular file. Check the man pages for the different files to make sure that each file is in the correct format.