1PAM_ENV(8)                     Linux-PAM Manual                     PAM_ENV(8)
2
3
4

NAME

6       pam_env - PAM module to set/unset environment variables
7

SYNOPSIS

9       pam_env.so [debug] [conffile=conf-file] [envfile=env-file]
10                  [readenv=0|1] [user_envfile=env-file] [user_readenv=0|1]
11

DESCRIPTION

13       The pam_env PAM module allows the (un)setting of environment variables.
14       Supported is the use of previously set environment variables as well as
15       PAM_ITEMs such as PAM_RHOST.
16
17       By default rules for (un)setting of variables are taken from the config
18       file /etc/security/pam_env.conf. An alternate file can be specified
19       with the conffile option.
20
21       Second a file (/etc/environment by default) with simple KEY=VAL pairs
22       on separate lines will be read. With the envfile option an alternate
23       file can be specified. And with the readenv option this can be
24       completely disabled.
25
26       Third it will read a user configuration file ($HOME/.pam_environment by
27       default). The default file can be changed with the user_envfile option
28       and it can be turned on and off with the user_readenv option.
29
30       Since setting of PAM environment variables can have side effects to
31       other modules, this module should be the last one on the stack.
32

OPTIONS

34       conffile=/path/to/pam_env.conf
35           Indicate an alternative pam_env.conf style configuration file to
36           override the default. This can be useful when different services
37           need different environments.
38
39       debug
40           A lot of debug information is printed with syslog(3).
41
42       envfile=/path/to/environment
43           Indicate an alternative environment file to override the default.
44           The syntax are simple KEY=VAL pairs on separate lines. The export
45           instruction can be specified for bash compatibility, but will be
46           ignored. This can be useful when different services need different
47           environments.
48
49       readenv=0|1
50           Turns on or off the reading of the file specified by envfile (0 is
51           off, 1 is on). By default this option is on.
52
53       user_envfile=filename
54           Indicate an alternative .pam_environment file to override the
55           default.The syntax is the same as for /etc/security/pam_env.conf.
56           The filename is relative to the user home directory. This can be
57           useful when different services need different environments.
58
59       user_readenv=0|1
60           Turns on or off the reading of the user specific environment file.
61           0 is off, 1 is on. By default this option is off as user supplied
62           environment variables in the PAM environment could affect behavior
63           of subsequent modules in the stack without the consent of the
64           system administrator.
65
66           Due to problematic security this functionality is deprecated since
67           the 1.5.0 version and will be removed completely at some point in
68           the future.
69

MODULE TYPES PROVIDED

71       The auth and session module types are provided.
72

RETURN VALUES

74       PAM_ABORT
75           Not all relevant data or options could be gotten.
76
77       PAM_BUF_ERR
78           Memory buffer error.
79
80       PAM_IGNORE
81           No pam_env.conf and environment file was found.
82
83       PAM_SUCCESS
84           Environment variables were set.
85

FILES

87       /etc/security/pam_env.conf
88           Default configuration file
89
90       /etc/environment
91           Default environment file
92
93       $HOME/.pam_environment
94           User specific environment file
95

SEE ALSO

97       pam_env.conf(5), pam.d(5), pam(8), environ(7).
98

AUTHOR

100       pam_env was written by Dave Kinchlea <kinch@kinch.ark.com>.
101
102
103
104Linux-PAM Manual                  09/03/2021                        PAM_ENV(8)
Impressum