NetApp
Vserver : Configuration > Local Users and Groups > Name Mapping : Understanding name mapping : Name mapping conversion rules

Name mapping conversion rules
A Data ONTAP system keeps a set of conversion rules for each Vserver. Each rule consists of two pieces: a pattern and a replacement. Conversions start at the beginning of the appropriate list and perform a substitution based on the first matching rule. The pattern is a UNIX-style regular expression. The replacement is a string containing escape sequences representing subexpressions from the pattern, as in the UNIX sed program.
Regular expressions are case-insensitive when mapping from Windows to UNIX. However, they are case-sensitive for Kerberos-to-UNIX and UNIX-to-Windows mappings.
As an example, the following rule converts the CIFS user named jones in the domain named ENG into the UNIX user named jones.
Note that the backslash is a special character in regular expressions and must be escaped with another backslash.
The caret (^), underscore (_), and ampersand (&) characters can be used as prefixes for digits in replacement patterns. These characters specify uppercase, lowercase, and initial-case transformations, respectively. For instance:
•
•
•
•
If the character following a backslash-underscore (\_), backslash-caret (\^), or backslash-ampersand (\&) sequence is not a digit, then the character following the backslash is used verbatim.
The following example converts any Windows user in the CIFS domain named ENG into a UNIX user with the same name in NIS.
The double backslash (\\) matches a single backslash. The parentheses denote a subexpression but do not match any characters themselves. The period matches any single character. The asterisk matches zero or more of the previous expression. In this example, you are matching ENG\ followed by one or more of any character. In the replacement, \1 refers to whatever the first subexpression matched. Assuming the CIFS user ENG\jones, the replacement evaluates to jones; that is, the portion of the name following ENG\.
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. Quotation marks are not required in the Web UI.
For further information about regular expressions, see your UNIX system administration documentation, the online UNIX documentation for sed or regex, or Mastering Regular Expressions, published by O'Reilly and Associates.


Was this topic helpful? Send comments to NetApp.