Skip to main content

vserver name-mapping create

Contributors
Suggest changes

Create a name mapping

Availability: This command is available to cluster and Vserver administrators at the admin privilege level.

Description

The vserver name-mapping create command creates a name mapping. Name mappings are applied in the order in which they occur in the priority list; for example, a name mapping that occurs at position 2 in the priority list is applied before a name mapping that occurs at position 3. Each mapping direction (Kerberos-to-UNIX, Windows-to-UNIX, UNIX-to-Windows, S3-to-UNIX and S3-to-Windows) has its own priority list. Data ONTAP prevents you from creating two name mappings with the same pattern.

Patterns can be expressed as POSIX regular expressions. For information about regular expressions, see the UNIX reference page for regex(7) .

Each Vserver can have up to 12500 name mappings in each direction.

Note If you are using the CLI, you must delimit all regular expressions with double quotation marks ("). For instance, to enter the regular expression (.)_`` in the CLI, type ``_"(.)" at the command prompt. To add a "?" to the expression, press ESC followed by the "?".

Parameters

-vserver <vserver name> - Vserver

This parameter specifies the Vserver on which you want to create the name mapping.

-direction {krb-unix|win-unix|unix-win|s3-unix|s3-win} - Direction

This parameter specifies the direction of the name mapping. Possible values are krb-unix for a Kerberos-to-UNIX name mapping, win-unix for a Windows-to-UNIX name mapping, unix-win for a UNIX-to-Windows name mapping, s3-unix for a S3-to-UNIX name mapping and s3-win for a S3-to-Windows name mapping.

-position <integer> - Position

This parameter specifies the name mapping's position in the priority list. Specify the position as a positive integer.

Note If you want to create a new name mapping at a position that is already occupied in the priority list, use the vserver name-mapping insert command instead of the vserver name-mapping create command.
-pattern <text> - Pattern

This parameter specifies the pattern you want to match. Refer to the command description section for details. The pattern can be up to 256 characters in length.

-replacement <text> - Replacement

This parameter specifies the replacement pattern. The replacement pattern can be up to 256 characters in length.

{ [-address <IP Address/Mask>] - IP Address with Subnet Mask

This optional parameter specifies the IP address that can be used to match the client's workstation IP address with the pattern.

| [-hostname <text>] - Hostname }

This optional parameter specifies the hostname that can be used to match the corresponding client's workstation IP address with the list of IP addresses with the pattern.

Examples

The following example creates a name mapping on a Vserver named vs1. The mapping is from UNIX to Windows at position 5 in the priority list. The mapping maps the pattern cifs to the replacement EXAMPLE\Domain Users.

cluster1::> vserver name-mapping create -vserver vs1 -direction unix-win -position 5 -pattern jane_doe -replacement contoso\\jdoe -address 10.238.33.245/24
cluster1::> vserver name-mapping create -vserver vs1 -direction unix-win -position 6 -pattern john_smith -replacement contoso\\jsmith -hostname google.com