cifs.idmap(8)
β¨ cifs.idmap β the little helper that maps your ids π
okay bestie, so this is cifs.idmap(8), straight out of the System Manager's Manual, and it's literally the userspace bestie that maps ids for the Common Internet File System (CIFS). let's get into it π«Ά
πΈ NAME πΈ
cifs.idmap β Userspace helper for mapping ids for Common Internet File System (CIFS)
β¨ SYNOPSIS β¨
cifs.idmap [--help|-h] [--timeout|-t] [--version|-v] {keyid}
π DESCRIPTION π
okay so first thing: this tool is part of the cifs-utils suite. no cap.
cifs.idmap is a userspace helper program for the linux CIFS client filesystem. there are, like, a bunch of activities that the kernel cannot easily do itself (rude of it honestly), and this program is a callout program that does these things for the kernel and then returns the result. it's giving personal assistant energy π
cifs.idmap is generally intended to be run when the kernel calls request-key(8) for a particular key type. while it can be run directly from the command-line, it is not generally intended to be run that way. it's not like a "hey let me just run this for fun" situation, iykyk.
this program is only called if a share is mounted with the cifsacl mount option. the kernel will only upcall to do this conversion if that mount option is specified. no cifsacl, no upcall, periodt.
cifs.idmap relies on a plugin to handle the ID mapping. if it can't find the plugin then it will not work properly π. the plugin (or a symlink to it) must be at /etc/cifs-utils/idmap-plugin.
and in the case wherecifs.idmapor the plugin are unavailable, file objects in a mounted share are assigned uid and gid of the credentials of the process that mounted the share. it is strongly recommended to use mount options ofuidandgidto specify a default uid and gid to map owner SIDs and group SIDs in this situation. like, don't skip this one bestie, it matters π
π OPTIONS π
--help|-hβ Print the usage message and exit. classic, iconic, does exactly what it says β¨--timeout|-tβ Set the expiration timer, in seconds on the key. the default is600seconds (10 minutes). setting this to0will cause the key to never expire. choose wisely π--version|-vβ Print version number and exit. that's it, that's the whole vibe π
π CONFIGURATION FOR KEYCTL π
cifs.idmap is designed to be called from the kernel via the request-key callout program. this requires that request-key be told where and how to call this program. so like, it needs directions, it's not gonna find it on its own π§
currently cifs.idmap handles a key type of:
cifs.idmap
this keytype is for mapping a SID to either an uid or a gid. slay.
to make this program useful for CIFS, you will need to set up entry for it in request-key.conf(5). here's an example of an entry for this key type:
#OPERATION TYPE D C PROGRAM ARG1 ARG2...
#========= ============= = = ================================
create cifs.idmap * * /usr/bin/cifs.idmap %k
see request-key.conf(5) for more info on each field. fr fr, go read it π
β NOTES β
support for upcalls to cifs.idmap was initially introduced in the 3.0 kernel. history lesson but make it cute π¦
π SEE ALSO π
request-key.conf(5), mount.cifs(8)
π AUTHOR π
Shirish Pargaonkar wrote the cifs.idmap program. the way that he just... made this. obsessed. π«Ά
The Linux CIFS Mailing list is the preferred place to ask questions regarding these programs. so if you're confused, that's where the girlies are, go ask them π
and that's the whole page bestie!! this was cifs.idmap(8) from the System Manager's Manual β mwah, go map some ids responsibly π
β¨π
π¦ where this page comes from
- fedora 44: cifs-utils 7.5-1.fc44 Β· GPL-3.0-only
- fedora 44: cifs-utils 7.8-2.fc44
- fedora 44: cifs-utils 7.9-2.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms