1.\"- 2.\" Copyright (c) 2005 Dag-Erling Co�dan Sm�rgrav 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. The name of the author may not be used to endorse or promote 14.\" products derived from this software without specific prior written 15.\" permission. 16.\" 17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" SUCH DAMAGE. 28.\" 29.\" $Id: pam.conf.5 320 2006-02-16 20:33:19Z des $ 30.\" 31.Dd June 16, 2005 32.Dt PAM.CONF 5 33.Os 34.Sh NAME 35.Nm pam.conf 36.Nd PAM policy file format 37.Sh DESCRIPTION 38The PAM library searches for policies in the following files, in 39decreasing order of preference: 40.Bl -enum 41.It 42.Pa /etc/pam.d/ Ns Ar service-name 43.It 44.Pa /etc/pam.conf 45.It 46.Pa /usr/local/etc/pam.d/ Ns Ar service-name 47.It 48.Pa /usr/local/etc/pam.conf 49.El 50.Pp 51If none of these locations contains a policy for the given service, 52the 53.Dv default 54policy is used instead, if it exists. 55.Pp 56Entries in per-service policy files must be of one of the two forms 57below: 58.Bd -unfilled -offset indent 59.Ar function-class control-flag module-path Op Ar arguments ... 60.Ar function-class Cm include Ar other-service-name 61.Ed 62.Pp 63Entries in 64.Pa pam.conf Ns -style 65policy files are of the same form, but are prefixed by an additional 66field specifying the name of the service they apply to. 67.Pp 68In both types of policy files, blank lines are ignored, as is anything 69to the right of a 70.Ql # 71sign. 72.Pp 73The 74.Ar function-class 75field specifies the class of functions the entry applies to, and is 76one of: 77.Bl -tag -width ".Cm password" 78.It Cm auth 79Authentication functions 80.Po 81.Xr pam_authenticate 3 , 82.Xr pam_setcred 3 83.Pc 84.It Cm account 85Account management functions 86.Pq Xr pam_acct_mgmt 3 87.It Cm session 88Session handling functions 89.Po 90.Xr pam_open_session 3 , 91.Xr pam_close_session 3 92.Pc 93.It Cm password 94Password management functions 95.Pq Xr pam_chauthtok 3 96.El 97.Pp 98The 99.Ar control-flag 100field determines how the result returned by the module affects the 101flow of control through (and the final result of) the rest of the 102chain, and is one of: 103.Bl -tag -width ".Cm sufficient" 104.It Cm required 105If this module succeeds, the result of the chain will be success 106unless a later module fails. 107If it fails, the rest of the chain still runs, but the final result 108will be failure regardless of the success of later modules. 109.It Cm requisite 110If this module succeeds, the result of the chain will be success 111unless a later module fails. 112If it module fails, the chain is broken and the result is failure. 113.It Cm sufficient 114If this module succeeds, the chain is broken and the result is 115success. 116If it fails, the rest of the chain still runs, but the final result 117will be failure unless a later module succeeds. 118.It Cm binding 119If this module succeeds, the chain is broken and the result is 120success. 121If it fails, the rest of the chain still runs, but the final result 122will be failure regardless of the success of later modules. 123.It Cm optional 124If this module succeeds, the result of the chain will be success 125unless a later module fails. 126If this module fails, the result of the chain will be failure unless a 127later module succeeds. 128.El 129.Pp 130There are two exceptions to the above: 131.Cm sufficient 132and 133.Cm binding 134modules are treated as 135.Cm optional 136by 137.Xr pam_setcred 3 , 138and in the 139.Dv PAM_PRELIM_CHECK 140phase of 141.Xr pam_chauthtok 3 . 142.Pp 143The 144.Ar module-path 145field specifies the name, or optionally the full path, of the module 146to call. 147.Pp 148The remaining fields are passed as arguments to the module if and when 149it is invoked. 150.Pp 151The 152.Cm include 153form of entry causes entries from a different chain (specified by 154.Ar other-system-name ) 155to be included in the current one. 156This allows one to define system-wide policies which are then included 157into service-specific policies. 158The system-wide policy can then be modified without having to also 159modify each and every service-specific policy. 160.Sh SEE ALSO 161.Xr pam 3 162.Sh STANDARDS 163.Rs 164.%T "X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules" 165.%D "June 1997" 166.Re 167.Sh AUTHORS 168The OpenPAM library was developed for the 169.Fx 170Project by ThinkSec 171AS and Network Associates Laboratories, the Security Research Division 172of Network Associates, Inc.\& under DARPA/SPAWAR contract 173N66001-01-C-8035 174.Pq Dq CBOSS , 175as part of the DARPA CHATS research program. 176.Pp 177This manual page was written by 178.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org . 179