xref: /dflybsd-src/contrib/openpam/doc/man/pam.conf.5 (revision 4c84ab30f7dd59ef873b5a6d4e27bcea89d9f848)
1ade90846SJoerg Sonnenberger.\"-
210b5fe87SSascha Wildner.\" Copyright (c) 2005-2017 Dag-Erling Smørgrav
3ade90846SJoerg Sonnenberger.\" All rights reserved.
4ade90846SJoerg Sonnenberger.\"
5ade90846SJoerg Sonnenberger.\" Redistribution and use in source and binary forms, with or without
6ade90846SJoerg Sonnenberger.\" modification, are permitted provided that the following conditions
7ade90846SJoerg Sonnenberger.\" are met:
8ade90846SJoerg Sonnenberger.\" 1. Redistributions of source code must retain the above copyright
9ade90846SJoerg Sonnenberger.\"    notice, this list of conditions and the following disclaimer.
10ade90846SJoerg Sonnenberger.\" 2. Redistributions in binary form must reproduce the above copyright
11ade90846SJoerg Sonnenberger.\"    notice, this list of conditions and the following disclaimer in the
12ade90846SJoerg Sonnenberger.\"    documentation and/or other materials provided with the distribution.
13ade90846SJoerg Sonnenberger.\" 3. The name of the author may not be used to endorse or promote
14ade90846SJoerg Sonnenberger.\"    products derived from this software without specific prior written
15ade90846SJoerg Sonnenberger.\"    permission.
16ade90846SJoerg Sonnenberger.\"
17ade90846SJoerg Sonnenberger.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18ade90846SJoerg Sonnenberger.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19ade90846SJoerg Sonnenberger.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20ade90846SJoerg Sonnenberger.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21ade90846SJoerg Sonnenberger.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22ade90846SJoerg Sonnenberger.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23ade90846SJoerg Sonnenberger.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24ade90846SJoerg Sonnenberger.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25ade90846SJoerg Sonnenberger.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26ade90846SJoerg Sonnenberger.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27ade90846SJoerg Sonnenberger.\" SUCH DAMAGE.
28ade90846SJoerg Sonnenberger.\"
29*4c84ab30SSascha Wildner.\" $OpenPAM: pam.conf.5 947 2019-02-24 20:18:17Z des $
30ade90846SJoerg Sonnenberger.\"
31*4c84ab30SSascha Wildner.Dd February 24, 2019
32ade90846SJoerg Sonnenberger.Dt PAM.CONF 5
33ade90846SJoerg Sonnenberger.Os
34ade90846SJoerg Sonnenberger.Sh NAME
35ade90846SJoerg Sonnenberger.Nm pam.conf
36ade90846SJoerg Sonnenberger.Nd PAM policy file format
37ade90846SJoerg Sonnenberger.Sh DESCRIPTION
38ade90846SJoerg SonnenbergerThe PAM library searches for policies in the following files, in
39ade90846SJoerg Sonnenbergerdecreasing order of preference:
40ade90846SJoerg Sonnenberger.Bl -enum
41ade90846SJoerg Sonnenberger.It
42ade90846SJoerg Sonnenberger.Pa /etc/pam.d/ Ns Ar service-name
43ade90846SJoerg Sonnenberger.It
44ade90846SJoerg Sonnenberger.Pa /etc/pam.conf
45ade90846SJoerg Sonnenberger.It
46ade90846SJoerg Sonnenberger.Pa /usr/local/etc/pam.d/ Ns Ar service-name
47ade90846SJoerg Sonnenberger.It
48ade90846SJoerg Sonnenberger.Pa /usr/local/etc/pam.conf
49ade90846SJoerg Sonnenberger.El
50ade90846SJoerg Sonnenberger.Pp
51ade90846SJoerg SonnenbergerIf none of these locations contains a policy for the given service,
52ade90846SJoerg Sonnenbergerthe
53577efdeeSPeter Avalos.Dq Dv other
54ade90846SJoerg Sonnenbergerpolicy is used instead, if it exists.
55ade90846SJoerg Sonnenberger.Pp
56ade90846SJoerg SonnenbergerEntries in per-service policy files must be of one of the two forms
57ade90846SJoerg Sonnenbergerbelow:
58ade90846SJoerg Sonnenberger.Bd -unfilled -offset indent
59a474e9feSPeter Avalos.Ar facility control-flag module-path Op Ar arguments ...
60a474e9feSPeter Avalos.Ar facility Cm include Ar other-service-name
61ade90846SJoerg Sonnenberger.Ed
62ade90846SJoerg Sonnenberger.Pp
63ade90846SJoerg SonnenbergerEntries in
64ade90846SJoerg Sonnenberger.Pa pam.conf Ns -style
65ade90846SJoerg Sonnenbergerpolicy files are of the same form, but are prefixed by an additional
66ade90846SJoerg Sonnenbergerfield specifying the name of the service they apply to.
67ade90846SJoerg Sonnenberger.Pp
6810b5fe87SSascha WildnerIn both cases, blank lines and comments introduced by a
69f23594ceSHasso Tepper.Ql #
7010b5fe87SSascha Wildnersign are ignored, and the normal shell quoting rules apply.
7110b5fe87SSascha WildnerThe precise details of how the file is tokenized are described in
7210b5fe87SSascha Wildner.Xr openpam_readword 3 .
73ade90846SJoerg Sonnenberger.Pp
74ade90846SJoerg SonnenbergerThe
75a474e9feSPeter Avalos.Ar facility
76a474e9feSPeter Avalosfield specifies the facility the entry applies to, and is one of:
7710b5fe87SSascha Wildner.Bl -tag -width 12n
78ade90846SJoerg Sonnenberger.It Cm auth
79ade90846SJoerg SonnenbergerAuthentication functions
80ade90846SJoerg Sonnenberger.Po
81ade90846SJoerg Sonnenberger.Xr pam_authenticate 3 ,
82ade90846SJoerg Sonnenberger.Xr pam_setcred 3
83ade90846SJoerg Sonnenberger.Pc
84ade90846SJoerg Sonnenberger.It Cm account
85ade90846SJoerg SonnenbergerAccount management functions
86ade90846SJoerg Sonnenberger.Pq Xr pam_acct_mgmt 3
87ade90846SJoerg Sonnenberger.It Cm session
88ade90846SJoerg SonnenbergerSession handling functions
89ade90846SJoerg Sonnenberger.Po
90ade90846SJoerg Sonnenberger.Xr pam_open_session 3 ,
91ade90846SJoerg Sonnenberger.Xr pam_close_session 3
92ade90846SJoerg Sonnenberger.Pc
93ade90846SJoerg Sonnenberger.It Cm password
94ade90846SJoerg SonnenbergerPassword management functions
95ade90846SJoerg Sonnenberger.Pq Xr pam_chauthtok 3
96ade90846SJoerg Sonnenberger.El
97ade90846SJoerg Sonnenberger.Pp
98ade90846SJoerg SonnenbergerThe
99ade90846SJoerg Sonnenberger.Ar control-flag
100ade90846SJoerg Sonnenbergerfield determines how the result returned by the module affects the
101ade90846SJoerg Sonnenbergerflow of control through (and the final result of) the rest of the
102ade90846SJoerg Sonnenbergerchain, and is one of:
10310b5fe87SSascha Wildner.Bl -tag -width 12n
104ade90846SJoerg Sonnenberger.It Cm required
105ade90846SJoerg SonnenbergerIf this module succeeds, the result of the chain will be success
106ade90846SJoerg Sonnenbergerunless a later module fails.
107ade90846SJoerg SonnenbergerIf it fails, the rest of the chain still runs, but the final result
108ade90846SJoerg Sonnenbergerwill be failure regardless of the success of later modules.
109ade90846SJoerg Sonnenberger.It Cm requisite
110ade90846SJoerg SonnenbergerIf this module succeeds, the result of the chain will be success
111ade90846SJoerg Sonnenbergerunless a later module fails.
112a474e9feSPeter AvalosIf the module fails, the chain is broken and the result is failure.
113ade90846SJoerg Sonnenberger.It Cm sufficient
114ade90846SJoerg SonnenbergerIf this module succeeds, the chain is broken and the result is
115ade90846SJoerg Sonnenbergersuccess.
116ade90846SJoerg SonnenbergerIf it fails, the rest of the chain still runs, but the final result
117ade90846SJoerg Sonnenbergerwill be failure unless a later module succeeds.
118ade90846SJoerg Sonnenberger.It Cm binding
119ade90846SJoerg SonnenbergerIf this module succeeds, the chain is broken and the result is
120ade90846SJoerg Sonnenbergersuccess.
121ade90846SJoerg SonnenbergerIf it fails, the rest of the chain still runs, but the final result
122ade90846SJoerg Sonnenbergerwill be failure regardless of the success of later modules.
123ade90846SJoerg Sonnenberger.It Cm optional
124ade90846SJoerg SonnenbergerIf this module succeeds, the result of the chain will be success
125ade90846SJoerg Sonnenbergerunless a later module fails.
126ade90846SJoerg SonnenbergerIf this module fails, the result of the chain will be failure unless a
127ade90846SJoerg Sonnenbergerlater module succeeds.
128ade90846SJoerg Sonnenberger.El
129ade90846SJoerg Sonnenberger.Pp
130ade90846SJoerg SonnenbergerThere are two exceptions to the above:
131ade90846SJoerg Sonnenberger.Cm sufficient
132ade90846SJoerg Sonnenbergerand
133ade90846SJoerg Sonnenberger.Cm binding
134ade90846SJoerg Sonnenbergermodules are treated as
135ade90846SJoerg Sonnenberger.Cm optional
136ade90846SJoerg Sonnenbergerby
137ade90846SJoerg Sonnenberger.Xr pam_setcred 3 ,
138ade90846SJoerg Sonnenbergerand in the
139ade90846SJoerg Sonnenberger.Dv PAM_PRELIM_CHECK
140ade90846SJoerg Sonnenbergerphase of
141ade90846SJoerg Sonnenberger.Xr pam_chauthtok 3 .
142ade90846SJoerg Sonnenberger.Pp
143ade90846SJoerg SonnenbergerThe
144ade90846SJoerg Sonnenberger.Ar module-path
14510b5fe87SSascha Wildnerfield specifies the name or full path of the module to call.
14610b5fe87SSascha WildnerIf only the name is specified, the PAM library will search for it in
14710b5fe87SSascha Wildnerthe following locations:
14810b5fe87SSascha Wildner.Bl -enum
14910b5fe87SSascha Wildner.It
15010b5fe87SSascha Wildner.Pa /usr/lib
15110b5fe87SSascha Wildner.It
15210b5fe87SSascha Wildner.Pa /usr/local/lib
15310b5fe87SSascha Wildner.El
154ade90846SJoerg Sonnenberger.Pp
15510b5fe87SSascha WildnerThe remaining fields, if any, are passed unmodified to the module if
15610b5fe87SSascha Wildnerand when it is invoked.
157ade90846SJoerg Sonnenberger.Pp
158ade90846SJoerg SonnenbergerThe
159ade90846SJoerg Sonnenberger.Cm include
160ade90846SJoerg Sonnenbergerform of entry causes entries from a different chain (specified by
161ade90846SJoerg Sonnenberger.Ar other-system-name )
162ade90846SJoerg Sonnenbergerto be included in the current one.
163ade90846SJoerg SonnenbergerThis allows one to define system-wide policies which are then included
164ade90846SJoerg Sonnenbergerinto service-specific policies.
165ade90846SJoerg SonnenbergerThe system-wide policy can then be modified without having to also
166ade90846SJoerg Sonnenbergermodify each and every service-specific policy.
16710b5fe87SSascha Wildner.Pp
16810b5fe87SSascha Wildner.Bf -symbolic
16910b5fe87SSascha WildnerTake care not to introduce loops when using
17010b5fe87SSascha Wildner.Cm include
17110b5fe87SSascha Wildnerrules, as there is currently no loop detection in place.
17210b5fe87SSascha Wildner.Ef
17310b5fe87SSascha Wildner.Sh MODULE OPTIONS
17410b5fe87SSascha WildnerSome PAM library functions may alter their behavior when called by a
17510b5fe87SSascha Wildnerservice module if certain module options were specified, regardless of
17610b5fe87SSascha Wildnerwhether the module itself accords them any importance.
17710b5fe87SSascha WildnerOne such option is
17810b5fe87SSascha Wildner.Cm debug ,
17910b5fe87SSascha Wildnerwhich causes the dispatcher to enable debugging messages before
18010b5fe87SSascha Wildnercalling each service function, and disable them afterwards (unless
18110b5fe87SSascha Wildnerthey were already enabled).
18210b5fe87SSascha WildnerOther special options include:
18310b5fe87SSascha Wildner.Bl -tag -width 12n
18410b5fe87SSascha Wildner.It Cm authtok_prompt Ns = Ns Ar prompt , Cm oldauthtok_prompt Ns = Ns Ar prompt , Cm user_prompt Ns = Ns Ar prompt
18510b5fe87SSascha WildnerThese options can be used to override the prompts used by
18610b5fe87SSascha Wildner.Xr pam_get_authtok 3
18710b5fe87SSascha Wildnerand
18810b5fe87SSascha Wildner.Xr pam_get_user 3 .
18910b5fe87SSascha Wildner.It Cm echo_pass
19010b5fe87SSascha WildnerThis option controls whether
19110b5fe87SSascha Wildner.Xr pam_get_authtok 3
19210b5fe87SSascha Wildnerwill allow the user to see what they are typing.
19310b5fe87SSascha Wildner.It Cm try_first_pass , Cm use_first_pass
19410b5fe87SSascha WildnerThese options control
19510b5fe87SSascha Wildner.Xr pam_get_authtok 3 Ns 's
19610b5fe87SSascha Wildneruse of cached authentication tokens.
19710b5fe87SSascha Wildner.El
198ade90846SJoerg Sonnenberger.Sh SEE ALSO
199ade90846SJoerg Sonnenberger.Xr pam 3
200ade90846SJoerg Sonnenberger.Sh STANDARDS
201ade90846SJoerg Sonnenberger.Rs
202ade90846SJoerg Sonnenberger.%T "X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules"
203ade90846SJoerg Sonnenberger.%D "June 1997"
204ade90846SJoerg Sonnenberger.Re
205ade90846SJoerg Sonnenberger.Sh AUTHORS
206f23594ceSHasso TepperThe OpenPAM library was developed for the
207f23594ceSHasso Tepper.Fx
208a474e9feSPeter AvalosProject by ThinkSec AS and Network Associates Laboratories, the
209a474e9feSPeter AvalosSecurity Research Division of Network Associates, Inc.\& under
210a474e9feSPeter AvalosDARPA/SPAWAR contract N66001-01-C-8035
211ade90846SJoerg Sonnenberger.Pq Dq CBOSS ,
212ade90846SJoerg Sonnenbergeras part of the DARPA CHATS research program.
213ade90846SJoerg Sonnenberger.Pp
214577efdeeSPeter AvalosThe OpenPAM library is maintained by
21510b5fe87SSascha Wildner.An Dag-Erling Sm\(/orgrav Aq Mt des@des.no .
216