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 where cifs.idmap or 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 of uid and gid to 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 is 600 seconds (10 minutes). setting this to 0 will 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