te
Copyright (C) 2003, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
YPMAP2SRC 1M "Apr 10, 2003"
NAME
ypmap2src - convert NIS maps to NIS source files
SYNOPSIS

/usr/lib/netsvc/yp/ypmap2src [-t]
 [ [-c custom-map-name]]... [-d domain] -o output-directory
 [ [ source-file]]...
DESCRIPTION

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.

"Handling Custom Maps"

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.

OPTIONS

ypmap2src supports the following options: -c

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.

-d domain-name

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.

-o dest

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.

-t

Specifies that traditional NIS maps, without N2L's LDAP_ prefix, should be converted. By default, maps with the LDAP_ prefix are converted.

OPERANDS

ypmap2src supports the following operands: source-file

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.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface Stability Obsolete
SEE ALSO

ypmake(1M), ypserv(1M), NISLDAPmapping(4), attributes(5)