pam_env.conf.5.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?xml version="1.0" encoding='UTF-8'?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
  4. <refentry id="pam_env.conf">
  5. <refmeta>
  6. <refentrytitle>pam_env.conf</refentrytitle>
  7. <manvolnum>5</manvolnum>
  8. <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
  9. </refmeta>
  10. <refnamediv>
  11. <refname>pam_env.conf</refname>
  12. <refname>environment</refname>
  13. <refpurpose>the environment variables config files</refpurpose>
  14. </refnamediv>
  15. <refsect1 id='pam_env.conf-description'>
  16. <title>DESCRIPTION</title>
  17. <para>
  18. The <filename>/etc/security/pam_env.conf</filename> file specifies
  19. the environment variables to be set, unset or modified by
  20. <citerefentry><refentrytitle>pam_env</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
  21. When someone logs in, this file is read and the environment
  22. variables are set according.
  23. </para>
  24. <para>
  25. Each line starts with the variable name, there are then two possible
  26. options for each variable DEFAULT and OVERRIDE. DEFAULT allows an
  27. administrator to set the value of the variable to some default
  28. value, if none is supplied then the empty string is assumed. The
  29. OVERRIDE option tells pam_env that it should enter in its value
  30. (overriding the default value) if there is one to use. OVERRIDE is
  31. not used, "" is assumed and no override will be done.
  32. </para>
  33. <para>
  34. <replaceable>VARIABLE</replaceable>
  35. [<replaceable>DEFAULT=[value]</replaceable>]
  36. [<replaceable>OVERRIDE=[value]</replaceable>]
  37. </para>
  38. <para>
  39. (Possibly non-existent) environment variables may be used in values
  40. using the ${string} syntax and (possibly non-existent) PAM_ITEMs as well
  41. as HOME and SHELL may be used in values using the @{string} syntax. Both
  42. the $ and @ characters can be backslash escaped to be used as literal values
  43. values can be delimited with "", escaped " not supported.
  44. Note that many environment variables that you would like to use
  45. may not be set by the time the module is called.
  46. For example, ${HOME} is used below several times, but
  47. many PAM applications don't make it available by the time you need it.
  48. The special variables @{HOME} and @{SHELL} are expanded to the values
  49. for the user from his <emphasis>passwd</emphasis> entry.
  50. </para>
  51. <para>
  52. The "<emphasis>#</emphasis>" character at start of line (no space
  53. at front) can be used to mark this line as a comment line.
  54. </para>
  55. <para>
  56. The <filename>/etc/environment</filename> file specifies
  57. the environment variables to be set. The file must consist of simple
  58. <emphasis>NAME=VALUE</emphasis> pairs on separate lines.
  59. The <citerefentry><refentrytitle>pam_env</refentrytitle><manvolnum>8</manvolnum></citerefentry>
  60. module will read the file after the <filename>pam_env.conf</filename>
  61. file.
  62. </para>
  63. </refsect1>
  64. <refsect1 id="pam_env.conf-examples">
  65. <title>EXAMPLES</title>
  66. <para>
  67. These are some example lines which might be specified in
  68. <filename>/etc/security/pam_env.conf</filename>.
  69. </para>
  70. <para>
  71. Set the REMOTEHOST variable for any hosts that are remote, default
  72. to "localhost" rather than not being set at all
  73. </para>
  74. <programlisting>
  75. REMOTEHOST DEFAULT=localhost OVERRIDE=@{PAM_RHOST}
  76. </programlisting>
  77. <para>
  78. Set the DISPLAY variable if it seems reasonable
  79. </para>
  80. <programlisting>
  81. DISPLAY DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY}
  82. </programlisting>
  83. <para>
  84. Now some simple variables
  85. </para>
  86. <programlisting>
  87. PAGER DEFAULT=less
  88. MANPAGER DEFAULT=less
  89. LESS DEFAULT="M q e h15 z23 b80"
  90. NNTPSERVER DEFAULT=localhost
  91. PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin\
  92. :/usr/bin:/usr/local/bin/X11:/usr/bin/X11
  93. XDG_DATA_HOME DEFAULT=@{HOME}/share/
  94. </programlisting>
  95. <para>
  96. Silly examples of escaped variables, just to show how they work.
  97. </para>
  98. <programlisting>
  99. DOLLAR DEFAULT=\$
  100. DOLLARDOLLAR DEFAULT= OVERRIDE=\$${DOLLAR}
  101. DOLLARPLUS DEFAULT=\${REMOTEHOST}${REMOTEHOST}
  102. ATSIGN DEFAULT="" OVERRIDE=\@
  103. </programlisting>
  104. </refsect1>
  105. <refsect1 id="pam_env.conf-see_also">
  106. <title>SEE ALSO</title>
  107. <para>
  108. <citerefentry><refentrytitle>pam_env</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
  109. <citerefentry><refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
  110. <citerefentry><refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
  111. <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
  112. </para>
  113. </refsect1>
  114. <refsect1 id="pam_env.conf-author">
  115. <title>AUTHOR</title>
  116. <para>
  117. pam_env was written by Dave Kinchlea &lt;kinch@kinch.ark.com&gt;.
  118. </para>
  119. </refsect1>
  120. </refentry>