---
name: "pam_env"
section: "8"
platform: "macos"
package: "pam_modules"
version: "217.100.6"
release: "macOS 26.5"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/pam_env"
---

# pam\_env(8)

The Environment PAM module

## NAME

**pam\_env** – The Environment PAM module

## SYNOPSIS

\[*service-name*\] *function-class* *control-flag* pam\_env \[*options*\]

## DESCRIPTION

The Environment PAM module supports the authentication and session management function classes.  In terms of the *function-class* parameter, these are “auth” and “session” respectively.  The Environment PAM module has identical support for both supported function classes.

The Environment PAM module allows the setting and unsetting of environment variables.  The use of previously set environment variables as well as PAM\_ITEMs such as PAM\_RHOST is supported.

This module can also parse a file with simple KEY=VAL pairs on separate lines (/etc/environment by default). You can change the default file to parse, with the **envfile** flag and turn it on or off by setting the **readenv** flag to 1 or 0 respectively.

The following options may be passed to this module:

- **conffile=/path/to/pam\_env.conf**

  Indicate an alternative pam\_env.conf style configuration file to override the default. This can be useful when different services need different environments.

- **debug**

  A lot of debug information will be printed to the system log.

- **envfile=/path/to/environment**

  Indicate an alternative environment file to override the default. This can be useful when different services need different environments.

- **readenv=0\|1**

  Turns on or off the reading of the file specified by envfile (0 is off, 1 is on). By default this option is on.

## FILES

- */etc/security/pam\_env.conf*

  The default configuration file.

- */etc/environment*

  The default environment file.

## SEE ALSO

[environ(7)](/environ/7.md), [pam.conf(5)](/pam.conf/5.md), [pam(8)](/pam/8.md)

## AUTHORS

The **pam\_env** module was written by Dave Kinchlea \<kinch@kinch.ark.com\>.
