1PAM_ENV(8) Linux-PAM Manual PAM_ENV(8)
2
3
4
6 pam_env - PAM module to set/unset environment variables
7
9 pam_env.so [debug] [conffile=conf-file] [envfile=env-file]
10 [readenv=0|1] [user_envfile=env-file] [user_readenv=0|1]
11
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 completly disabled.
25
26 Third it will read a user configuration file ($HOME/.pam_environment by
27 default). The default file file can be changed with the user_envfile
28 option 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
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/environment. The
56 filename is relative to the user home directory. This can be useful
57 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
67 The auth and session module types are provided.
68
70 PAM_ABORT
71 Not all relevant data or options could be gotten.
72
73 PAM_BUF_ERR
74 Memory buffer error.
75
76 PAM_IGNORE
77 No pam_env.conf and environment file was found.
78
79 PAM_SUCCESS
80 Environment variables were set.
81
83 /etc/security/pam_env.conf
84 Default configuration file
85
86 /etc/environment
87 Default environment file
88
89 $HOME/.pam_environment
90 User specific environment file
91
93 pam_env.conf(5), pam.d(5), pam(8), environ(7).
94
96 pam_env was written by Dave Kinchlea <kinch@kinch.ark.com>.
97
98
99
100Linux-PAM Manual 02/02/2019 PAM_ENV(8)