Debian Codegraph @

upstream/opensuse-tumbleweed/man5/pam_env.conf.5

raw
1 '\" t
2 .\" Title: pam_env.conf
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
5 .\" Date: 05/26/2026
6 .\" Manual: Linux-PAM Manual
7 .\" Source: Linux-PAM
8 .\" Language: English
9 .\"
10 .TH "PAM_ENV\&.CONF" "5" "05/26/2026" "Linux\-PAM" "Linux\-PAM Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 pam_env.conf, environment \- the environment variables config files
32 .SH "DESCRIPTION"
33 .PP
34 The
35 /usr/etc/security/pam_env\&.conf
36 and
37 /etc/security/pam_env\&.conf
38 files specify the environment variables to be set, unset or modified by
39 \fBpam_env\fR(8)\&. When someone logs in, these files are read and the environment variables are set according\&.
40 .PP
41 Each line starts with the variable name, there are then two possible options for each variable DEFAULT and OVERRIDE\&. DEFAULT allows an administrator to set the value of the variable to some default value, if none is supplied then the empty string is assumed\&. The OVERRIDE option tells pam_env that it should enter in its value (overriding the default value) if there is one to use\&. When OVERRIDE is not used, "" is assumed and no override will be done\&.
42 .PP
43 \fIVARIABLE\fR
44 [\fIDEFAULT=[value]\fR] [\fIOVERRIDE=[value]\fR]
45 .PP
46 (Possibly non\-existent) environment variables may be used in values using the ${string} syntax and (possibly non\-existent) PAM_ITEMs as well as HOME and SHELL may be used in values using the @{string} syntax\&. Both the $ and @ characters can be backslash escaped to be used as literal values values can be delimited with "", escaped " not supported\&. Note that many environment variables that you would like to use may not be set by the time the module is called\&. For example, ${HOME} is used below several times, but many PAM applications don\*(Aqt make it available by the time you need it\&. The special variables @{HOME} and @{SHELL} are expanded to the values for the user from the corresponding
47 \fIpasswd\fR
48 entry\&.
49 .PP
50 The "\fI#\fR" character at start of line (no space at front) can be used to mark this line as a comment line\&.
51 .PP
52 The
53 /usr/etc/environment
54 and
55 /etc/environment
56 files specify the environment variables to be set\&. These files must consist of simple
57 \fINAME=VALUE\fR
58 pairs on separate lines\&. The
59 \fBpam_env\fR(8)
60 module will read these files after the
61 pam_env\&.conf
62 file\&.
63 .SH "EXAMPLES"
64 .PP
65 These are some example lines which might be specified in
66 /etc/security/pam_env\&.conf\&.
67 .PP
68 Set the REMOTEHOST variable for any hosts that are remote, default to "localhost" rather than not being set at all
69 .sp
70 .if n \{\
71 .RS 4
72 .\}
73 .nf
74 REMOTEHOST DEFAULT=localhost OVERRIDE=@{PAM_RHOST}
75
76 .fi
77 .if n \{\
78 .RE
79 .\}
80 .PP
81 Set the DISPLAY variable if it seems reasonable
82 .sp
83 .if n \{\
84 .RS 4
85 .\}
86 .nf
87 DISPLAY DEFAULT=${REMOTEHOST}:0\&.0 OVERRIDE=${DISPLAY}
88
89 .fi
90 .if n \{\
91 .RE
92 .\}
93 .PP
94 Now some simple variables
95 .sp
96 .if n \{\
97 .RS 4
98 .\}
99 .nf
100 PAGER DEFAULT=less
101 MANPAGER DEFAULT=less
102 LESS DEFAULT="M q e h15 z23 b80"
103 NNTPSERVER DEFAULT=localhost
104 PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin\e
105 :/usr/bin:/usr/local/bin/X11:/usr/bin/X11
106 XDG_DATA_HOME DEFAULT=@{HOME}/share/
107
108 .fi
109 .if n \{\
110 .RE
111 .\}
112 .PP
113 Silly examples of escaped variables, just to show how they work\&.
114 .sp
115 .if n \{\
116 .RS 4
117 .\}
118 .nf
119 DOLLAR DEFAULT=\e$
120 DOLLARDOLLAR DEFAULT= OVERRIDE=\e$${DOLLAR}
121 DOLLARPLUS DEFAULT=\e${REMOTEHOST}${REMOTEHOST}
122 ATSIGN DEFAULT="" OVERRIDE=\e@
123
124 .fi
125 .if n \{\
126 .RE
127 .\}
128 .SH "SEE ALSO"
129 .PP
130 \fBpam_env\fR(8),
131 \fBpam.d\fR(5),
132 \fBpam\fR(8),
133 \fBenviron\fR(7)
134 .SH "AUTHOR"
135 .PP
136 pam_env was written by Dave Kinchlea <kinch@kinch\&.ark\&.com>\&.