PAM_GET_ITEMS(8)

πŸ’… PAM_GET_ITEMS πŸ’…

okay bestie, welcome to PAM_GET_ITEMS(8) β€” yes that's section 8, admin/system tools territory, we're fancy now. this is pam_get_items, and it's literally the nosiest little PAM test module you've ever met. it's giving "let me see everything" energy and honestly? iconic. πŸ¦‹


✨ NAME ✨

pam_get_items β€” a PAM test module to retrieve module-specific PAM items. yes that's the whole job. she does one thing and she slays it. πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

pam_get_items.so

that's it. that's the whole synopsis. no flags, no arguments, she simply exists. πŸ’…


🌸 DESCRIPTION 🌸

so here's the tea, bestie. β˜•

PAM modules store data in PAM items. these items are only accessible from module context, not application context β€” because they might include private data (and yes, PAM_AUTHTOK normally contains the password, so like… obviously we're not just handing that out πŸ™ˆ).

but when you're testing PAM modules, it's often nice to make sure a PAM module under test sets items for the next module the way it's supposed to. like, did you actually do the thing? vibe check. ✨

the pam_get_items module makes this possible by exporting all PAM items as environment variables using pam_putenv. and the environment variable name? it's the same as the constant name of the PAM item. no renaming, no remixing, no creative liberties. fr fr. πŸ’―


πŸ’– OPTIONS πŸ’–

  • None β€” zero options. nothing to configure. she woke up and chose simplicity. 🌈

πŸ‘‘ MODULE TYPES PROVIDED πŸ‘‘

All module types are provided β€” that's account, auth, password and session. every single one. main character energy across the entire stack. πŸ’œ


🧚 EXAMPLE 🧚

okay consider this example that tests that pam_unix puts the password it reads onto the PAM stack. the test service file would contain:

auth required        pam_unix.so
auth required        pam_get_items.so

then the test would run the PAM conversation and afterwards call:

pam_getenv(pamh, "PAM_AUTHTOK");

to retrieve the password. boom. got 'em. πŸ“

bestie reminder: that PAM_AUTHTOK is the literal password, so be normal about it, okay? 😭

🌟 SEE ALSO... jk, there's no SEE ALSO section 🌟

ngl there really isn't one. i checked. don't come for me. πŸ’€


and that's the whole page, bestie!! this manual page is dated 2015-11-04 and it lives as PAM_GET_ITEMS(8) β€” so like, section 8, the system administration girlies. she's been out here since 2015 and she still eats. ate and left no crumbs. periodt. πŸ«ΆπŸ’–βœ¨