.\" .\" libnfsidmap-regex(5) .\" .\" COPYRIGHT (c) 2020 .\" ETH Zurich .\" ALL RIGHTS RESERVED .\" .\" Permission is granted to use, copy, create derivative works .\" and redistribute this software and such derivative works .\" for any purpose, so long as the name of The University of .\" Michigan is not used in any advertising or publicity .\" pertaining to the use of distribution of this software .\" without specific, written prior authorization. If the .\" above copyright notice or any other identification of the .\" University of Michigan is included in any copy of any .\" portion of this software, then the disclaimer below must .\" also be included. .\" .\" THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION .\" FROM THE UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY .\" PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF .\" MICHIGAN OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING .\" WITHOUT LIMITATION THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE .\" REGENTS OF THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE .\" FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, OR .\" CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE, EVEN .\" IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGES. .\" .TH libnfsidmap-regex 5 "25 March 2020" .SH NAME regex \- libnfsidmap plugin using regex for mapping ids .SH SYNOPSIS Plugin for libnfsidmap. Uses regex to map NFSv4 names to and from ids. .SH DESCRIPTION The .B regex plugin parses NFSv4 user and groups names using regex to extract the local user or group. NFSv4 names are created by adding constant strings before and after the local user and group names. It additionally supports an additional configuration file for static group mappings. .SH CONFIGURATION The configuration for the plugin is in a new [Regex] section in .I /etc/idmapd.conf that may contain lines of the form .nf variable = value .fi The recognized variables are as follows: .SS "[Regex] section variables" .nf .fi .TP .B User-Regex Regular expression that extracts the local user name from an NFSv4 name. Several expressions can be concatenated with '|'. The first match will be used. .TP .B Group-Regex Regular expression that extracts the local group name from an NFSv4 name. Several expressions can be concatenated with '|'. The first match will be used. .TP .B Prepend-Before-User Constant string to put before a local user name when building an NFSv4 name. (Default: none) .TP .B Append-After-User Constant string to put after a local user name when building an NFSv4 name. (Default: none) .TP .B Prepend-Before-Group Constant string to put before a local group name when building an NFSv4 name. (Default: none) .TP .B Append-After-Group Constant string to put before a local group name when building an NFSv4 name. (Default: none) .TP .B Group-Name-Prefix Constant string that is prepended to a local group name when converting it to an NFSv4 name. If an NFSv4 group name has this prefix it is removed when converting it to a local group name. IS not applied if a static group mapping matches. This allows one to organize the group name space in a central directory that is used for a central NFS4 server and use short group names in the local directory used in organizational units. .TP .B Group-Name-No-Prefix-Regex Regular expression to exclude groups from adding and removing the prefix set by Group-Name-Prefix. The regular expression must match both the remote and local group names. (Default: none) .TP .B Group-Map-File File name of an INI style file containing static group mappings. (Default: /etc/idmapd.conf) .TP .B Group-Map-Section Section in the static group mapping file that contains the mappings. The name must be all lower case. The section name in the file is case sensitive. (Default: groups) .nf .SH STATIC MAPPING The .B Group-Map-File and .B Group-Map-Section variables can be used to define a section containing mappings of the form .nf nfs4 group = local group .fi The default is to have a .B [Groups] section in the .I /etc/idmapd.conf file. For both the NFS4 and local group name the .B Group-Name-Prefix prefix is not applied or removed. .nf .SH EXAMPLES An example .B [Regex] and .B [Groups] section in the .I /etc/idmapd.conf file: .nf [Regex] User-Regex = ^EXAMPLE\\([^@]+)@EXAMPLE.ORG$ Group-Regex = ^([^@]+)@EXAMPLE.ORG@EXAMPLE.ORG$|^EXAMPLE\\([^@]+)@EXAMPLE.ORG$ Prepend-Before-User = EXAMPLE\ Append-After-User = @EXAMPLE.ORG #Prepend-Before-Group = Append-After-Group = @example.org@example.org Group-Name-Prefix = sales- Group-Name-No-Prefix-Regex = -group$ [Groups] domain users = users .fi .SH SEE ALSO .BR idmapd.conf (5) .\".SH COMPATIBILITY .\".SH STANDARDS .\".SH ACKNOWLEDGEMENTS .\".SH AUTHORS .\".SH HISTORY .SH BUGS Report bugs to .\".SH CAVEATS