336 lines
5.6 KiB
HTML
336 lines
5.6 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of PAM_SUCCEED_IF</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>PAM_SUCCEED_IF</H1>
|
|
Section: Linux-PAM (8)<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"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
pam_succeed_if - test account characteristics
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>pam_succeed_if.so</B> [<I>flag</I>...] [<I>condition</I>...]
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<DD>pam_succeed_if.so is designed to succeed or fail authentication based on characteristics of the account belonging to the user being authenticated or values of other PAM items. One use is to select whether to load other modules based on this test.
|
|
<P>
|
|
|
|
The module should be given one or more conditions as module arguments, and authentication will succeed only if all of the conditions are met.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<P>
|
|
|
|
The following
|
|
<I>flag</I>s are supported:
|
|
<P>
|
|
|
|
<B>debug</B>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
Turns on debugging messages sent to syslog.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>use_uid</B>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
Evaluate conditions using the account of the user whose UID the application is running under instead of the user being authenticated.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>quiet</B>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
Don't log failure or success to the system log.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>quiet_fail</B>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
Don't log failure to the system log.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>quiet_success</B>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
Don't log success to the system log.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>audit</B>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
Log unknown users to the system log.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<I>Condition</I>s are three words: a field, a test, and a value to test for.
|
|
<P>
|
|
|
|
Available fields are
|
|
<I>user</I>,
|
|
<I>uid</I>,
|
|
<I>gid</I>,
|
|
<I>shell</I>,
|
|
<I>home</I>,
|
|
<I>ruser</I>,
|
|
<I>rhost</I>,
|
|
<I>tty</I>
|
|
and
|
|
<I>service</I>:
|
|
<P>
|
|
|
|
<B>field < number</B>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
Field has a value numerically less than number.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>field <= number</B>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
Field has a value numerically less than or equal to number.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>field eq number</B>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
Field has a value numerically equal to number.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>field >= number</B>
|
|
<DL COMPACT><DT id="11"><DD>
|
|
Field has a value numerically greater than or equal to number.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>field > number</B>
|
|
<DL COMPACT><DT id="12"><DD>
|
|
Field has a value numerically greater than number.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>field ne number</B>
|
|
<DL COMPACT><DT id="13"><DD>
|
|
Field has a value numerically different from number.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>field = string</B>
|
|
<DL COMPACT><DT id="14"><DD>
|
|
Field exactly matches the given string.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>field != string</B>
|
|
<DL COMPACT><DT id="15"><DD>
|
|
Field does not match the given string.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>field =~ glob</B>
|
|
<DL COMPACT><DT id="16"><DD>
|
|
Field matches the given glob.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>field !~ glob</B>
|
|
<DL COMPACT><DT id="17"><DD>
|
|
Field does not match the given glob.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>field in item:item:...</B>
|
|
<DL COMPACT><DT id="18"><DD>
|
|
Field is contained in the list of items separated by colons.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>field notin item:item:...</B>
|
|
<DL COMPACT><DT id="19"><DD>
|
|
Field is not contained in the list of items separated by colons.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>user ingroup group</B>
|
|
<DL COMPACT><DT id="20"><DD>
|
|
User is in given group.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>user notingroup group</B>
|
|
<DL COMPACT><DT id="21"><DD>
|
|
User is not in given group.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>user innetgr netgroup</B>
|
|
<DL COMPACT><DT id="22"><DD>
|
|
(user,host) is in given netgroup.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>user notinnetgr group</B>
|
|
<DL COMPACT><DT id="23"><DD>
|
|
(user,host) is not in given netgroup.
|
|
</DL>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>MODULE TYPES PROVIDED</H2>
|
|
|
|
<P>
|
|
|
|
All module types (<B>account</B>,
|
|
<B>auth</B>,
|
|
<B>password</B>
|
|
and
|
|
<B>session</B>) are provided.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>RETURN VALUES</H2>
|
|
|
|
<P>
|
|
|
|
PAM_SUCCESS
|
|
<DL COMPACT><DT id="24"><DD>
|
|
The condition was true.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
PAM_AUTH_ERR
|
|
<DL COMPACT><DT id="25"><DD>
|
|
The condition was false.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
PAM_SERVICE_ERR
|
|
<DL COMPACT><DT id="26"><DD>
|
|
A service error occurred or the arguments can't be parsed correctly.
|
|
</DL>
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
|
|
To emulate the behaviour of
|
|
<I>pam_wheel</I>, except there is no fallback to group 0:
|
|
<P>
|
|
<DL COMPACT><DT id="27"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
auth required pam_succeed_if.so quiet user ingroup wheel
|
|
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Given that the type matches, only loads the othermodule rule if the UID is over 500. Adjust the number after default to skip several rules.
|
|
<P>
|
|
<DL COMPACT><DT id="28"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500
|
|
type required othermodule.so arguments...
|
|
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+glob">glob</A></B>(7),
|
|
<B><A HREF="/cgi-bin/man/man2html?7+pam">pam</A></B>(7)
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<P>
|
|
|
|
Nalin Dahyabhai <<A HREF="mailto:nalin@redhat.com">nalin@redhat.com</A>>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="29"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="30"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="31"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="32"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="33"><A HREF="#lbAF">MODULE TYPES PROVIDED</A><DD>
|
|
<DT id="34"><A HREF="#lbAG">RETURN VALUES</A><DD>
|
|
<DT id="35"><A HREF="#lbAH">EXAMPLES</A><DD>
|
|
<DT id="36"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
<DT id="37"><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:14 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|