xref: /freebsd/lib/libpam/modules/pam_unix/pam_unix.8 (revision 1642eb1a52563643a9e0b3b69b82c8f1e45541db)
11642eb1aSMark Murray.\" Copyright (c) 2001 Mark R V Murray
21642eb1aSMark Murray.\" All rights reserved.
31642eb1aSMark Murray.\"
41642eb1aSMark Murray.\" Redistribution and use in source and binary forms, with or without
51642eb1aSMark Murray.\" modification, are permitted provided that the following conditions
61642eb1aSMark Murray.\" are met:
71642eb1aSMark Murray.\" 1. Redistributions of source code must retain the above copyright
81642eb1aSMark Murray.\"    notice, this list of conditions and the following disclaimer.
91642eb1aSMark Murray.\" 2. Redistributions in binary form must reproduce the above copyright
101642eb1aSMark Murray.\"    notice, this list of conditions and the following disclaimer in the
111642eb1aSMark Murray.\"    documentation and/or other materials provided with the distribution.
121642eb1aSMark Murray.\"
131642eb1aSMark Murray.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
141642eb1aSMark Murray.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
151642eb1aSMark Murray.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
161642eb1aSMark Murray.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
171642eb1aSMark Murray.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
181642eb1aSMark Murray.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
191642eb1aSMark Murray.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
201642eb1aSMark Murray.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
211642eb1aSMark Murray.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
221642eb1aSMark Murray.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
231642eb1aSMark Murray.\" SUCH DAMAGE.
241642eb1aSMark Murray.\"
251642eb1aSMark Murray.\" $FreeBSD$
261642eb1aSMark Murray.\"
271642eb1aSMark Murray.Dd July 7, 2001
281642eb1aSMark Murray.Dt PAM_UNIX 8
291642eb1aSMark Murray.Os
301642eb1aSMark Murray.Sh NAME
311642eb1aSMark Murray.Nm pam_unix
321642eb1aSMark Murray.Nd UNIX PAM module
331642eb1aSMark Murray.Sh SYNOPSIS
341642eb1aSMark Murray.Op Ar service-name
351642eb1aSMark Murray.Ar module-type
361642eb1aSMark Murray.Ar control-flag
371642eb1aSMark Murray.Pa pam_unix
381642eb1aSMark Murray.Op Ar options
391642eb1aSMark Murray.Sh DESCRIPTION
401642eb1aSMark MurrayThe
411642eb1aSMark Murray.Ux
421642eb1aSMark Murrayauthentication service module for PAM,
431642eb1aSMark Murray.Nm
441642eb1aSMark Murrayprovides functionality for two PAM categories:
451642eb1aSMark Murrayauthentication
461642eb1aSMark Murrayand account management.
471642eb1aSMark MurrayIn terms of the
481642eb1aSMark Murray.Ar module-type
491642eb1aSMark Murrayparameter, they are the
501642eb1aSMark Murray.Dv auth
511642eb1aSMark Murrayand
521642eb1aSMark Murray.Dv account
531642eb1aSMark Murrayfeatures.
541642eb1aSMark MurrayIt also provides a null function for session management.
551642eb1aSMark Murray.Ss Ux Authentication Module
561642eb1aSMark MurrayThe
571642eb1aSMark Murray.Ux
581642eb1aSMark Murrayauthentication component
591642eb1aSMark Murrayprovides functions to verify the identity of a user
601642eb1aSMark Murray.Pq Fn pam_sm_authenticate ,
611642eb1aSMark Murraywhich obtains the relevant
621642eb1aSMark Murray.Xr passwd 5
631642eb1aSMark Murrayentry.
641642eb1aSMark MurrayIt prompts the user for a password
651642eb1aSMark Murrayand verifies that this is correct with
661642eb1aSMark Murray.Xr crypt 3 .
671642eb1aSMark Murray.Pp
681642eb1aSMark MurrayThe following options may be passed to the authentication module:
691642eb1aSMark Murray.Bl -tag -xwidth ".Cm use_first_pass"
701642eb1aSMark Murray.It Cm debug
711642eb1aSMark Murray.Xr syslog 3
721642eb1aSMark Murraydebugging information at
731642eb1aSMark Murray.Dv LOG_DEBUG
741642eb1aSMark Murraylevel.
751642eb1aSMark Murray.It Cm use_first_pass
761642eb1aSMark MurrayIf the authentication module
771642eb1aSMark Murrayis not the first in the stack,
781642eb1aSMark Murrayand a previous module
791642eb1aSMark Murrayobtained the user's password,
801642eb1aSMark Murraythat password is used
811642eb1aSMark Murrayto authenticate the user.
821642eb1aSMark MurrayIf this fails,
831642eb1aSMark Murraythe authentication module returns failure
841642eb1aSMark Murraywithout prompting the user for a password.
851642eb1aSMark MurrayThis option has no effect
861642eb1aSMark Murrayif the authentication module
871642eb1aSMark Murrayis the first in the stack,
881642eb1aSMark Murrayor if no previous modules
891642eb1aSMark Murrayobtained the user's password.
901642eb1aSMark Murray.It Cm try_first_pass
911642eb1aSMark MurrayThis option is similar to the
921642eb1aSMark Murray.Cm use_first_pass
931642eb1aSMark Murrayoption,
941642eb1aSMark Murrayexcept that if the previously obtained password fails,
951642eb1aSMark Murraythe user is prompted for another password.
961642eb1aSMark Murray.It Cm auth_as_self
971642eb1aSMark MurrayThis option will require the user
981642eb1aSMark Murrayto authenticate themself as the user
991642eb1aSMark Murraygiven by
1001642eb1aSMark Murray.Fn getuid 2 ,
1011642eb1aSMark Murraynot as the account they are attempting to access.
1021642eb1aSMark MurrayThis is primarily for services like
1031642eb1aSMark Murray.Xr su 1 ,
1041642eb1aSMark Murraywhere the user's ability to retype
1051642eb1aSMark Murraytheir own password
1061642eb1aSMark Murraymight be deemed sufficient.
1071642eb1aSMark Murray.It Cm nullok
1081642eb1aSMark MurrayIf the password database
1091642eb1aSMark Murrayhas no password
1101642eb1aSMark Murrayfor the entity being authenticated,
1111642eb1aSMark Murraythen this option
1121642eb1aSMark Murraywill forgo password prompting,
1131642eb1aSMark Murrayand silently allow authentication to succeed.
1141642eb1aSMark Murray.El
1151642eb1aSMark Murray.Ss Ux Account Management Module
1161642eb1aSMark MurrayThe
1171642eb1aSMark Murray.Ux
1181642eb1aSMark Murrayaccount management component
1191642eb1aSMark Murrayprovides a function to perform account management,
1201642eb1aSMark Murray.Fn pam_sm_acct_mgmt .
1211642eb1aSMark MurrayThe function verifies
1221642eb1aSMark Murraythat the authenticated user
1231642eb1aSMark Murrayis allowed to login to the local user account
1241642eb1aSMark Murrayby checking the password expiry date.
1251642eb1aSMark Murray.Pp
1261642eb1aSMark MurrayThe following options may be passed to the management module:
1271642eb1aSMark Murray.Bl -tag -xwidth ".Cm use_first_pass"
1281642eb1aSMark Murray.It Cm debug
1291642eb1aSMark Murray.Xr syslog 3
1301642eb1aSMark Murraydebugging information at
1311642eb1aSMark Murray.Dv LOG_DEBUG
1321642eb1aSMark Murraylevel.
1331642eb1aSMark Murray.El
1341642eb1aSMark Murray.Sh FILES
1351642eb1aSMark Murray.Bl -tag -xwidth ".Pa /etc/master.passwd" -compact
1361642eb1aSMark Murray.It Pa /etc/master.passwd
1371642eb1aSMark Murraydefault
1381642eb1aSMark Murray.Ux
1391642eb1aSMark Murraypassword database.
1401642eb1aSMark Murray.El
1411642eb1aSMark Murray.Sh SEE ALSO
1421642eb1aSMark Murray.Xr passwd 1 ,
1431642eb1aSMark Murray.Xr getuid 2 ,
1441642eb1aSMark Murray.Xr crypt 3 ,
1451642eb1aSMark Murray.Xr passwd 5 ,
1461642eb1aSMark Murray.Xr syslog 3 ,
1471642eb1aSMark Murray.Xr pam.conf 5 ,
1481642eb1aSMark Murray.Xr pam 8
149