---
name: "pam_get_items"
section: "8"
platform: "linux"
package: "pam_wrapper"
version: "1.1.8-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pam_get_items"
---

# pam\_get\_items(8)

A PAM test module to retrieve module-specific PAM items

## NAME

pam\_get\_items - A PAM test module to retrieve module-specific PAM items

## SYNOPSIS

pam\_get\_items.so

## DESCRIPTION

PAM modules store data in PAM *items*. These items are only accessible from module context, not application context as they might include private data (PAM\_AUTHTOK normally contains the password). But when 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. The pam\_get\_items module makes this possible by exporting all PAM items as environment variables using pam\_putenv. The environment variable name is the same as the constant name of the PAM item.

## OPTIONS

None

## MODULE TYPES PROVIDED

All module types (**account**, **auth**, **password** and **session**) are provided.

## EXAMPLE

Consider an example that tests that pam\_unix puts the password it reads onto 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.
