Import Linux-PAM.
[profile/ivi/pam.git] / modules / pam_env / README
1 pam_env — PAM module to set/unset environment variables
2
3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4
5 DESCRIPTION
6
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.
10
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.
13
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
17 respectively.
18
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.
21
22 OPTIONS
23
24 conffile=/path/to/pam_env.conf
25
26     Indicate an alternative pam_env.conf style configuration file to override
27     the default. This can be useful when different services need different
28     environments.
29
30 debug
31
32     A lot of debug information is printed with syslog(3).
33
34 envfile=/path/to/environment
35
36     Indicate an alternative environment file to override the default. This can
37     be useful when different services need different environments.
38
39 readenv=0|1
40
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.
43
44 user_envfile=filename
45
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.
49
50 user_readenv=0|1
51
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.
54
55 EXAMPLES
56
57 These are some example lines which might be specified in /etc/security/
58 pam_env.conf.
59
60 Set the REMOTEHOST variable for any hosts that are remote, default to
61 "localhost" rather than not being set at all
62
63       REMOTEHOST     DEFAULT=localhost OVERRIDE=@{PAM_RHOST}
64
65
66 Set the DISPLAY variable if it seems reasonable
67
68       DISPLAY        DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY}
69
70
71 Now some simple variables
72
73       PAGER          DEFAULT=less
74       MANPAGER       DEFAULT=less
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
79
80
81 Silly examples of escaped variables, just to show how they work.
82
83       DOLLAR         DEFAULT=\$
84       DOLLARDOLLAR   DEFAULT=        OVERRIDE=\$${DOLLAR}
85       DOLLARPLUS     DEFAULT=\${REMOTEHOST}${REMOTEHOST}
86       ATSIGN         DEFAULT=""      OVERRIDE=\@
87
88