pam_env.conf.5 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. '\" t
  2. .\" Title: pam_env.conf
  3. .\" Author: [see the "AUTHOR" section]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
  5. .\" Date: 09/03/2021
  6. .\" Manual: Linux-PAM Manual
  7. .\" Source: Linux-PAM Manual
  8. .\" Language: English
  9. .\"
  10. .TH "PAM_ENV\&.CONF" "5" "09/03/2021" "Linux-PAM Manual" "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\&. 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 his
  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. .fi
  72. .if n \{\
  73. .RE
  74. .\}
  75. .PP
  76. Set the DISPLAY variable if it seems reasonable
  77. .sp
  78. .if n \{\
  79. .RS 4
  80. .\}
  81. .nf
  82. DISPLAY DEFAULT=${REMOTEHOST}:0\&.0 OVERRIDE=${DISPLAY}
  83. .fi
  84. .if n \{\
  85. .RE
  86. .\}
  87. .PP
  88. Now some simple variables
  89. .sp
  90. .if n \{\
  91. .RS 4
  92. .\}
  93. .nf
  94. PAGER DEFAULT=less
  95. MANPAGER DEFAULT=less
  96. LESS DEFAULT="M q e h15 z23 b80"
  97. NNTPSERVER DEFAULT=localhost
  98. PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin\e
  99. :/usr/bin:/usr/local/bin/X11:/usr/bin/X11
  100. XDG_DATA_HOME DEFAULT=@{HOME}/share/
  101. .fi
  102. .if n \{\
  103. .RE
  104. .\}
  105. .PP
  106. Silly examples of escaped variables, just to show how they work\&.
  107. .sp
  108. .if n \{\
  109. .RS 4
  110. .\}
  111. .nf
  112. DOLLAR DEFAULT=\e$
  113. DOLLARDOLLAR DEFAULT= OVERRIDE=\e$${DOLLAR}
  114. DOLLARPLUS DEFAULT=\e${REMOTEHOST}${REMOTEHOST}
  115. ATSIGN DEFAULT="" OVERRIDE=\e@
  116. .fi
  117. .if n \{\
  118. .RE
  119. .\}
  120. .SH "SEE ALSO"
  121. .PP
  122. \fBpam_env\fR(8),
  123. \fBpam.d\fR(5),
  124. \fBpam\fR(8),
  125. \fBenviron\fR(7)
  126. .SH "AUTHOR"
  127. .PP
  128. pam_env was written by Dave Kinchlea <kinch@kinch\&.ark\&.com>\&.