PAM_SET_ITEMS(8)

πŸ’– NAME πŸ’–

pam_set_items β€” a PAM test module that sets module-specific PAM items. It's giving test helper energy, bestie. 🧚


✨ SYNOPSIS ✨

pam_set_items.so

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so real talk: PAM modules store data in PAM items. These items are only accessible from module context, not application context, because they might include private data (PAM_AUTHTOK normally contains the password). Like, imagine exposing that to the whole app? no thank you. πŸ™ˆ

But when you're testing PAM modules, it's often nice to make sure a PAM module under test can retrieve data from the stack. That's where pam_set_items comes in β€” it makes this possible by reading environment variables and setting them as PAM items. Lowkey iconic behavior. πŸ’…


πŸ’… OPTIONS πŸ’…

  • None β€” literally zero flags, zero options. That's the whole menu. Periodt.

πŸ‘‘ MODULE TYPES PROVIDED πŸ‘‘

All module types (account, auth, password and session) are provided. So yes, she does it all. Main character energy fr fr. 🌈


🌸 EXAMPLE 🌸

Consider an example that tests that pam_unix is able to read a provided password and doesn't query on its own. The test service file would contain:

auth required        pam_set_items.so
auth required        pam_unix.so

Then the test would put the item to the test environment with:

setenv("PAM_AUTHTOK", "secret");

Then run the PAM conversation. Slay. ✨


That's the whole page, bestie. This is PAM_SET_ITEMS(8), dated 2015-11-04. Stay hydrated and test your PAM modules. πŸ«ΆπŸ’–