man-pages/man7/pam_env.7.html
2021-03-31 01:06:50 +01:00

234 lines
5.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of PAM_ENV</TITLE>
</HEAD><BODY>
<H1>PAM_ENV</H1>
Section: Linux-PAM Manual (7)<BR>Updated: 05/18/2017<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
pam_env - PAM module to set/unset environment variables
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<DL COMPACT>
<DT id="1">
<B>pam_env.so</B> [debug] [conffile=<I>conf-file</I>] [envfile=<I>env-file</I>] [readenv=<I>0|1</I>] [user_envfile=<I>env-file</I>] [user_readenv=<I>0|1</I>]
</DL>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
<DD>The pam_env PAM module allows the (un)setting of environment variables. Supported is the use of previously set environment variables as well as
<I>PAM_ITEM</I>s such as
<I>PAM_RHOST</I>.
<P>
By default rules for (un)setting of variables are taken from the config file
/etc/security/pam_env.conf. An alternate file can be specified with the
<I>conffile</I>
option.
<P>
Second a file (/etc/environment
by default) with simple
<I>KEY=VAL</I>
pairs on separate lines will be read. With the
<I>envfile</I>
option an alternate file can be specified. And with the
<I>readenv</I>
option this can be completly disabled.
<P>
Third it will read a user configuration file ($HOME/.pam_environment
by default). The default file file can be changed with the
<I>user_envfile</I>
option and it can be turned on and off with the
<I>user_readenv</I>
option.
<P>
Since setting of PAM environment variables can have side effects to other modules, this module should be the last one on the stack.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
<B>conffile=</B><B></B><I>/path/to/pam_env.conf</I>
<DL COMPACT><DT id="2"><DD>
Indicate an alternative
pam_env.conf
style configuration file to override the default. This can be useful when different services need different environments.
</DL>
<P>
<B>debug</B>
<DL COMPACT><DT id="3"><DD>
A lot of debug information is printed with
<B><A HREF="/cgi-bin/man/man2html?3+syslog">syslog</A></B>(3).
</DL>
<P>
<B>envfile=</B><B></B><I>/path/to/environment</I>
<DL COMPACT><DT id="4"><DD>
Indicate an alternative
environment
file to override the default. The syntax are simple
<I>KEY=VAL</I>
pairs on separate lines. The
<I>export</I>
instruction can be specified for bash compatibility, but will be ignored. This can be useful when different services need different environments.
</DL>
<P>
<B>readenv=</B><B></B><I>0|1</I>
<DL COMPACT><DT id="5"><DD>
Turns on or off the reading of the file specified by envfile (0 is off, 1 is on). By default this option is on.
</DL>
<P>
<B>user_envfile=</B><B></B><I>filename</I>
<DL COMPACT><DT id="6"><DD>
Indicate an alternative
.pam_environment
file to override the default.The syntax is the same as for
<I>/etc/environment</I>. The filename is relative to the user home directory. This can be useful when different services need different environments.
</DL>
<P>
<B>user_readenv=</B><B></B><I>0|1</I>
<DL COMPACT><DT id="7"><DD>
Turns on or off the reading of the user specific environment file. 0 is off, 1 is on. By default this option is off.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>MODULE TYPES PROVIDED</H2>
<P>
The
<B>auth</B>
and
<B>session</B>
module types are provided.
<A NAME="lbAG">&nbsp;</A>
<H2>RETURN VALUES</H2>
<P>
PAM_ABORT
<DL COMPACT><DT id="8"><DD>
Not all relevant data or options could be gotten.
</DL>
<P>
PAM_BUF_ERR
<DL COMPACT><DT id="9"><DD>
Memory buffer error.
</DL>
<P>
PAM_IGNORE
<DL COMPACT><DT id="10"><DD>
No pam_env.conf and environment file was found.
</DL>
<P>
PAM_SUCCESS
<DL COMPACT><DT id="11"><DD>
Environment variables were set.
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>FILES</H2>
<P>
/etc/security/pam_env.conf
<DL COMPACT><DT id="12"><DD>
Default configuration file
</DL>
<P>
/etc/environment
<DL COMPACT><DT id="13"><DD>
Default environment file
</DL>
<P>
$HOME/.pam_environment
<DL COMPACT><DT id="14"><DD>
User specific environment file
</DL>
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<P>
<B><A HREF="/cgi-bin/man/man2html?5+pam_env.conf">pam_env.conf</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?5+pam.d">pam.d</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?8+pam">pam</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?7+environ">environ</A></B>(7).
<A NAME="lbAJ">&nbsp;</A>
<H2>AUTHOR</H2>
<P>
pam_env was written by Dave Kinchlea &lt;<A HREF="mailto:kinch@kinch.ark.com">kinch@kinch.ark.com</A>&gt;.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="15"><A HREF="#lbAB">NAME</A><DD>
<DT id="16"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="17"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="18"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="19"><A HREF="#lbAF">MODULE TYPES PROVIDED</A><DD>
<DT id="20"><A HREF="#lbAG">RETURN VALUES</A><DD>
<DT id="21"><A HREF="#lbAH">FILES</A><DD>
<DT id="22"><A HREF="#lbAI">SEE ALSO</A><DD>
<DT id="23"><A HREF="#lbAJ">AUTHOR</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:09 GMT, March 31, 2021
</BODY>
</HTML>