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