|Skip Navigation Links|
|Exit Print View|
|man pages section 1M: System Administration Commands Oracle Solaris 10 1/13 Information Library|
- convert NIS maps to NIS source files
/usr/lib/netsvc/yp/ypmap2src [-t] [ [-c custom-map-name]]... [-d domain] -o output-directory [ [ source-file]]...
Use the ypmap2src utility to convert standard NIS maps to approximations of the equivalent NIS source files. This utility functions like the reverse of ypmake(1M).
The primary use for ypmap2src is to convert from a NIS server that uses the NIS to LDAP(N2L) transition mechanism, which does not use NIS source files, to traditional NIS, where source files are required. The ypmap2src utility is also used by NIS administrators who wish to discover the contents of NIS maps for which the sources are not available.
Generally, this operation is not necessary. More often, administrators will switch from traditional NIS to N2L in anticipation of the eventual transition to LDAP naming. When this switch is made, authoritative information is moved into the LDAP DIT, and the NIS sources have no further role. N2L supports NIS clients until such time as they can be converted to LDAP, and the NIS service suspended.
The ypmap2src utility does not guarantee that the files that are generated are identical to the original NIS source files. Some information might have been thrown away by ypmake and cannot be recovered. N2L also might have updated the maps to reflect changes made by LDAP clients. It is essential that the sources generated are checked to confirm no problems have occurred.
Per entry comment fields, from existing source files, are not merged into source files generated by ypmap2src. If a user wishes N2L to maintain comment information, then the NISLDAPmapping configuration file should be modified so that the comment fields are mapped into LDAP. This will ensure that the comments are visible to native LDAP clients and present in the N2L map files.
When ypmap2src is run, it will take up-to-date comments from the map file and insert them into the NIS source file generated.
ypmap2src only knows about the standard NIS maps and standard source to map conversion. If an advanced user has changed these, that is, the user has modified the NIS makefile, the equivalent changes must also be made to the ypmap2src script.
ypmap2src supports the following options:
Specifies that custom-map-name should be converted to a source file by running makedbm -u on it. This is a short cut so that simple custom maps can be handled without editing ypmap2src.
Specifies the domain to convert. The domain-name can be a fully qualified file path, such as /var/yp/a.b.c, or just a domain name, a.b.c. In the latter case, ypmaptosrc looks in /var/yp for the domain directory.
Specifies the destination directory for the converted files. A directory other than /etc should be specified. The maps generated are copied to the correct location, /etc, /etc/security or other source directory, as appropriate.
Specifies that traditional NIS maps, without N2L's LDAP_ prefix, should be converted. By default, maps with the LDAP_ prefix are converted.
ypmap2src supports the following operands:
Lists the standard source files to convert. If this option is not given, then all the standard source files, plus any custom files pecified by the -c option, are converted.
See attributes(5) for descriptions of the following attributes: