pam_cifscreds(8)

πŸ’… pam_cifscreds β€” the PAM module that handles your NTLM creds (manual page pam_cifscreds(8), straight out of the System Manager's Manual, bestie)

okay so picture this: you're logged in, you've got a multiuser cifs mount, and somebody has to hand the kernel your username + password. That somebody is pam_cifscreds. She's iconic, she's lowkey invisible, and she's about to make your login Just Workβ„’. Let's get into it πŸŽ€


✨ SYNOPSIS ✨

So basically you go edit the PAM config files for the systems where you want NTLM credentials registered automatically β€” think /etc/pam.d/login β€” and you tweak them like this:

...
auth       substack     system-auth
+++ auth       optional     pam_cifscreds.so
auth       include      postlogin
...

...
session    include      system-auth
+++ session    optional     pam_cifscreds.so domain=DOMAIN
session    include      postlogin
...

Then swap DOMAIN for the name of your Windows domain, or use host= instead (more on that down below πŸ‘‡).


🌸 DESCRIPTION 🌸

pam_cifscreds is that PAM module that automatically adds credentials (username and password, the whole package πŸ’–) so you can establish sessions in multiuser mounts. She's the plug.

Here's the situation she solves: when a cifs filesystem is mounted with the "multiuser" option and it is not using krb5 authentication, it still needs to get each user's credentials from somewhere. Nobody's gonna manifest them out of thin air. That's literally where pam_cifscreds comes in β€” she hands those credentials to the kernel automatically at login. Effortless. Main character energy fr fr.

In the session section of the PAM configuration file, the module can take either an NT domain name or a list of hostnames or addresses. iykyk πŸ¦‹


πŸ’… OPTIONS πŸ’…

pam_cifscreds supports a couple options which you set in the PAM configuration files. Heads up though: you must have one (and only one) of domain= or host=. Not zero, not both. One. Periodt.

  • debug β€” turns on some extra debug logging. Very "let me see what's going on in here" of her πŸ‘‘
  • domain=<NT domain name> β€” credentials get added for the specified NT domain name.
  • host=<hostname or IP address>[,...] β€” credentials get added for the specified hostnames or IP addresses. Yes you can list multiple, separated by commas πŸ”₯

πŸ¦‹ NOTES πŸ¦‹

  • The pam_cifscreds PAM module requires a kernel built with support for the login key type. That key type was added in v3.3 in mainline Linux kernels. So like… check your kernel bestie, no cap.
  • Since pam_cifscreds adds keys to the session keyring, it is highly recommended that you use pam_keyinit to make sure a session keyring is actually established at login time. Do not skip this, she needs her setup to be right 😭
fr fr, use pam_keyinit. This is the "drink water and get 8 hours of sleep" of this man page.

🌈 SEE ALSO 🌈


πŸ’œ AUTHOR πŸ’œ

The pam_cifscreds PAM module was developed by Orion Poplawski <<orion@nwra.com>>. Legend behavior, honestly 🫢


and that's the whole page, bestie! this one's pam_cifscreds(8) from the System Manager's Manual β€” go forth, register those NTLM credentials, and slay βœ¨πŸ’…

πŸ“¦ where this page comes from