1PAM_ENV.CONF(5)                Linux-PAM Manual                PAM_ENV.CONF(5)
2
3
4

NAME

6       pam_env.conf, environment - the environment variables config files
7

DESCRIPTION

9       The /etc/security/pam_env.conf file specifies the environment variables
10       to be set, unset or modified by pam_env(8). When someone logs in, this
11       file is read and the environment variables are set according.
12
13       Each line starts with the variable name, there are then two possible
14       options for each variable DEFAULT and OVERRIDE. DEFAULT allows and
15       administrator to set the value of the variable to some default value,
16       if none is supplied then the empty string is assumed. The OVERRIDE
17       option tells pam_env that it should enter in its value (overriding the
18       default value) if there is one to use. OVERRIDE is not used, "" is
19       assumed and no override will be done.
20
21       VARIABLE [DEFAULT=[value]] [OVERRIDE=[value]]
22
23       (Possibly non-existent) environment variables may be used in values
24       using the ${string} syntax and (possibly non-existent) PAM_ITEMs may be
25       used in values using the @{string} syntax. Both the $ and @ characters
26       can be backslash escaped to be used as literal values values can be
27       delimited with "", escaped " not supported. Note that many environment
28       variables that you would like to use may not be set by the time the
29       module is called. For example, HOME is used below several times, but
30       many PAM applications don't make it available by the time you need it.
31
32       The "#" character at start of line (no space at front) can be used to
33       mark this line as a comment line.
34
35       The /etc/environment file specifies the environment variables to be
36       set. The file must consist of simple NAME=VALUE pairs on separate
37       lines. The pam_env(8) module will read the file after the pam_env.conf
38       file.
39

EXAMPLES

41       These are some example lines which might be specified in
42       /etc/security/pam_env.conf.
43
44       Set the REMOTEHOST variable for any hosts that are remote, default to
45       "localhost" rather than not being set at all
46
47                 REMOTEHOST     DEFAULT=localhost OVERRIDE=@{PAM_RHOST}
48
49
50       Set the DISPLAY variable if it seems reasonable
51
52                 DISPLAY        DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY}
53
54
55       Now some simple variables
56
57                 PAGER          DEFAULT=less
58                 MANPAGER       DEFAULT=less
59                 LESS           DEFAULT="M q e h15 z23 b80"
60                 NNTPSERVER     DEFAULT=localhost
61                 PATH           DEFAULT=${HOME}/bin:/usr/local/bin:/bin\
62                 :/usr/bin:/usr/local/bin/X11:/usr/bin/X11
63
64
65       Silly examples of escaped variables, just to show how they work.
66
67                 DOLLAR         DEFAULT=\$
68                 DOLLARDOLLAR   DEFAULT=        OVERRIDE=\$${DOLLAR}
69                 DOLLARPLUS     DEFAULT=\${REMOTEHOST}${REMOTEHOST}
70                 ATSIGN         DEFAULT=""      OVERRIDE=\@
71
72

SEE ALSO

74       pam_env(8), pam.d(5), pam(8), environ(7)
75

AUTHOR

77       pam_env was written by Dave Kinchlea <kinch@kinch.ark.com>.
78
79
80
81Linux-PAM Manual                  04/11/2018                   PAM_ENV.CONF(5)
Impressum