Debian Codegraph @

upstream/debian-unstable/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: 06/29/2025
6 .\" Manual: Linux-PAM Manual
7 .\" Source: Linux-PAM
8 .\" Language: English
9 .\"
10 .TH "PAM_ENV\&.CONF" "5" "06/29/2025" "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 /etc/security/pam_env\&.conf
36 file specifies the environment variables to be set, unset or modified by
37 \fBpam_env\fR(8)\&. When someone logs in, this file is read and the environment variables are set according\&.
38 .PP
39 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\&.
40 .PP
41 \fIVARIABLE\fR
42 [\fIDEFAULT=[value]\fR] [\fIOVERRIDE=[value]\fR]
43 .PP
44 (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
45 \fIpasswd\fR
46 entry\&.
47 .PP
48 The "\fI#\fR" character at start of line (no space at front) can be used to mark this line as a comment line\&.
49 .PP
50 The
51 /etc/environment
52 file specifies the environment variables to be set\&. The file must consist of simple
53 \fINAME=VALUE\fR
54 pairs on separate lines\&. The
55 \fBpam_env\fR(8)
56 module will read the file after the
57 pam_env\&.conf
58 file\&.
59 .SH "EXAMPLES"
60 .PP
61 These are some example lines which might be specified in
62 /etc/security/pam_env\&.conf\&.
63 .PP
64 Set the REMOTEHOST variable for any hosts that are remote, default to "localhost" rather than not being set at all
65 .sp
66 .if n \{\
67 .RS 4
68 .\}
69 .nf
70 REMOTEHOST DEFAULT=localhost OVERRIDE=@{PAM_RHOST}
71
72 .fi
73 .if n \{\
74 .RE
75 .\}
76 .PP
77 Set the DISPLAY variable if it seems reasonable
78 .sp
79 .if n \{\
80 .RS 4
81 .\}
82 .nf
83 DISPLAY DEFAULT=${REMOTEHOST}:0\&.0 OVERRIDE=${DISPLAY}
84
85 .fi
86 .if n \{\
87 .RE
88 .\}
89 .PP
90 Now some simple variables
91 .sp
92 .if n \{\
93 .RS 4
94 .\}
95 .nf
96 PAGER DEFAULT=less
97 MANPAGER DEFAULT=less
98 LESS DEFAULT="M q e h15 z23 b80"
99 NNTPSERVER DEFAULT=localhost
100 PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin\e
101 :/usr/bin:/usr/local/bin/X11:/usr/bin/X11
102 XDG_DATA_HOME DEFAULT=@{HOME}/share/
103
104 .fi
105 .if n \{\
106 .RE
107 .\}
108 .PP
109 Silly examples of escaped variables, just to show how they work\&.
110 .sp
111 .if n \{\
112 .RS 4
113 .\}
114 .nf
115 DOLLAR DEFAULT=\e$
116 DOLLARDOLLAR DEFAULT= OVERRIDE=\e$${DOLLAR}
117 DOLLARPLUS DEFAULT=\e${REMOTEHOST}${REMOTEHOST}
118 ATSIGN DEFAULT="" OVERRIDE=\e@
119
120 .fi
121 .if n \{\
122 .RE
123 .\}
124 .SH "SEE ALSO"
125 .PP
126 \fBpam_env\fR(8),
127 \fBpam.d\fR(5),
128 \fBpam\fR(7),
129 \fBenviron\fR(7)
130 .SH "AUTHOR"
131 .PP
132 pam_env was written by Dave Kinchlea <kinch@kinch\&.ark\&.com>\&.