1 pam_env — PAM module to set/unset environment variables
3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
7 The pam_env PAM module allows the (un)setting of environment variables.
8 Supported is the use of previously set environment variables as well as
9 PAM_ITEMs such as PAM_RHOST.
11 By default rules for (un)setting of variables is taken from the config file /
12 etc/security/pam_env.conf if no other file is specified.
14 This module can also parse a file with simple KEY=VAL pairs on separate lines
15 (/etc/environment by default). You can change the default file to parse, with
16 the envfile flag and turn it on or off by setting the readenv flag to 1 or 0
19 Since setting of PAM environment variables can have side effects to other
20 modules, this module should be the last one on the stack.
24 conffile=/path/to/pam_env.conf
26 Indicate an alternative pam_env.conf style configuration file to override
27 the default. This can be useful when different services need different
32 A lot of debug information is printed with syslog(3).
34 envfile=/path/to/environment
36 Indicate an alternative environment file to override the default. This can
37 be useful when different services need different environments.
41 Turns on or off the reading of the file specified by envfile (0 is off, 1
42 is on). By default this option is on.
46 Indicate an alternative .pam_environment file to override the default. This
47 can be useful when different services need different environments. The
48 filename is relative to the user home directory.
52 Turns on or off the reading of the user specific environment file. 0 is
53 off, 1 is on. By default this option is on.
57 These are some example lines which might be specified in /etc/security/
60 Set the REMOTEHOST variable for any hosts that are remote, default to
61 "localhost" rather than not being set at all
63 REMOTEHOST DEFAULT=localhost OVERRIDE=@{PAM_RHOST}
66 Set the DISPLAY variable if it seems reasonable
68 DISPLAY DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY}
71 Now some simple variables
75 LESS DEFAULT="M q e h15 z23 b80"
76 NNTPSERVER DEFAULT=localhost
77 PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin\
78 :/usr/bin:/usr/local/bin/X11:/usr/bin/X11
81 Silly examples of escaped variables, just to show how they work.
84 DOLLARDOLLAR DEFAULT= OVERRIDE=\$${DOLLAR}
85 DOLLARPLUS DEFAULT=\${REMOTEHOST}${REMOTEHOST}
86 ATSIGN DEFAULT="" OVERRIDE=\@