libnfsidmap-regex(5)
π NAME π
okay so bestie, this is libnfsidmap-regex β manual page number 5, filed under File Formats Manual πβ¨
regex β it's the libnfsidmap plugin that uses regex to map ids π§
β¨ SYNOPSIS β¨
A plugin for libnfsidmap. It uses regex to map NFSv4 names to and from ids. that's the whole vibe π¦
πΈ DESCRIPTION πΈ
The regex plugin parses NFSv4 user and group names using regex to extract the local user or group. fr fr that's its whole job π
NFSv4 names get created by slapping constant strings before and after the local user and group names. iconic sandwich behavior π₯ͺβ¨
It additionally supports an additional configuration file for static group mappings. yes bestie, extra config, extra power π
π CONFIGURATION π
The config for this plugin lives in a brand new [Regex] section inside /etc/idmapd.conf, and it can contain lines shaped like this:
variable = value
The variables it actually recognizes are these ones π
π
[Regex] section variables
User-Regexβ the regular expression that pulls the local user name out of an NFSv4 name. You can concatenate several expressions with|, and the first match is the one that gets used. first come first served, periodt βGroup-Regexβ the regular expression that pulls the local group name out of an NFSv4 name. Same deal: concatenate several with|, and the first match wins. π«Prepend-Before-Userβ a constant string to put before a local user name when you're building an NFSv4 name.
(Default: none)
Append-After-Userβ a constant string to put after a local user name when you're building an NFSv4 name.
(Default: none)
Prepend-Before-Groupβ a constant string to put before a local group name when you're building an NFSv4 name.
(Default: none)
Append-After-Groupβ a constant string to put before a local group name when you're building an NFSv4 name.
(Default: none)
okay bestie yes, that one really does say "before" in its description. I'm not fixing it, I'm not touching it, I'm just reporting what the page says π
Group-Name-Prefixβ a constant string that gets prepended to a local group name when it's converted into an NFSv4 name. And if an NFSv4 group name has this prefix, the prefix gets removed when converting it back to a local group name. It IS not applied if a static group mapping matches. β οΈ
This is the whole point: it lets you organize the group name space in a central directory that's used for a central NFS4 server, while using short group names in the local directory used in organizational units. big brain centralization energy π§ π
Group-Name-No-Prefix-Regexβ a regular expression to exclude groups from adding and removing the prefix set byGroup-Name-Prefix. The regex must match both the remote and local group names. both of them, no skipping π
(Default: none)
Group-Map-Fileβ the file name of an INI style file containing static group mappings.
(Default: /etc/idmapd.conf)
Group-Map-Sectionβ the 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. two rules, don't mix them up π
(Default: groups)
π¦ STATIC MAPPING π¦
The Group-Map-File and Group-Map-Section variables let you define a section full of mappings shaped like:
nfs4 group = local group
The default is to have a [Groups] section in the /etc/idmapd.conf file. yes bestie, defaults really do be doing all the work π«
For both the NFS4 and the local group name, the Group-Name-Prefix prefix is not applied or removed. none of that, not here π«
β EXAMPLES β
Here's an example [Regex] and [Groups] section inside /etc/idmapd.conf:
[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
copy it, tweak it, slay it π β¨
π SEE ALSO π
π BUGS π
Report bugs to <stefan.walter@inf.ethz.ch> ππ¬
and that's the whole page bestie!! this one's from the File Formats Manual family, and it's dated 25 March 2020 π β go forth and map those ids, no cap π«ΆππΈ
π¦ where this page comes from
- ubuntu jammy: libnfsidmap-regex 1.2-1build1 Β· BSD-3-Clause
- COPYRIGHT (c) 2020 ETH Zurich
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms