1*030d4fb5Sreed.\" $NetBSD: pam_unix.8,v 1.9 2019/12/23 17:51:57 reed Exp $ 26f11bdf1Schristos.\" Copyright (c) 2001 Mark R V Murray 36f11bdf1Schristos.\" All rights reserved. 46f11bdf1Schristos.\" Copyright (c) 2001 Networks Associates Technology, Inc. 56f11bdf1Schristos.\" All rights reserved. 66f11bdf1Schristos.\" 76f11bdf1Schristos.\" This software was developed for the FreeBSD Project by ThinkSec AS and 86f11bdf1Schristos.\" NAI Labs, the Security Research Division of Network Associates, Inc. 96f11bdf1Schristos.\" under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the 106f11bdf1Schristos.\" DARPA CHATS research program. 116f11bdf1Schristos.\" 126f11bdf1Schristos.\" Redistribution and use in source and binary forms, with or without 136f11bdf1Schristos.\" modification, are permitted provided that the following conditions 146f11bdf1Schristos.\" are met: 156f11bdf1Schristos.\" 1. Redistributions of source code must retain the above copyright 166f11bdf1Schristos.\" notice, this list of conditions and the following disclaimer. 176f11bdf1Schristos.\" 2. Redistributions in binary form must reproduce the above copyright 186f11bdf1Schristos.\" notice, this list of conditions and the following disclaimer in the 196f11bdf1Schristos.\" documentation and/or other materials provided with the distribution. 206f11bdf1Schristos.\" 3. The name of the author may not be used to endorse or promote 216f11bdf1Schristos.\" products derived from this software without specific prior written 226f11bdf1Schristos.\" permission. 236f11bdf1Schristos.\" 246f11bdf1Schristos.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 256f11bdf1Schristos.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 266f11bdf1Schristos.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 276f11bdf1Schristos.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 286f11bdf1Schristos.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 296f11bdf1Schristos.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 306f11bdf1Schristos.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 316f11bdf1Schristos.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 326f11bdf1Schristos.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 336f11bdf1Schristos.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 346f11bdf1Schristos.\" SUCH DAMAGE. 356f11bdf1Schristos.\" 364251f117Sthorpej.\" $FreeBSD: src/lib/libpam/modules/pam_unix/pam_unix.8,v 1.11 2005/01/21 10:44:10 ru Exp $ 376f11bdf1Schristos.\" 389b82a3d7Swiz.Dd February 26, 2005 396f11bdf1Schristos.Dt PAM_UNIX 8 406f11bdf1Schristos.Os 416f11bdf1Schristos.Sh NAME 426f11bdf1Schristos.Nm pam_unix 436f11bdf1Schristos.Nd UNIX PAM module 446f11bdf1Schristos.Sh SYNOPSIS 456f11bdf1Schristos.Op Ar service-name 466f11bdf1Schristos.Ar module-type 476f11bdf1Schristos.Ar control-flag 486f11bdf1Schristos.Pa pam_unix 496f11bdf1Schristos.Op Ar options 506f11bdf1Schristos.Sh DESCRIPTION 516f11bdf1SchristosThe 526f11bdf1Schristos.Ux 532f6bdc4aSthorpejauthentication service module for PAM 546f11bdf1Schristosprovides functionality for two PAM categories: 556f11bdf1Schristosauthentication 566f11bdf1Schristosand account management. 576f11bdf1SchristosIn terms of the 586f11bdf1Schristos.Ar module-type 596f11bdf1Schristosparameter, they are the 606f11bdf1Schristos.Dq Li auth 616f11bdf1Schristosand 626f11bdf1Schristos.Dq Li account 636f11bdf1Schristosfeatures. 646f11bdf1SchristosIt also provides a null function for session management. 65*030d4fb5Sreed.Ss UNIX Authentication Module 666f11bdf1SchristosThe 676f11bdf1Schristos.Ux 686f11bdf1Schristosauthentication component 696f11bdf1Schristosprovides functions to verify the identity of a user 706f11bdf1Schristos.Pq Fn pam_sm_authenticate , 716f11bdf1Schristoswhich obtains the relevant 726f11bdf1Schristos.Xr passwd 5 736f11bdf1Schristosentry. 746f11bdf1SchristosIt prompts the user for a password 756f11bdf1Schristosand verifies that this is correct with 766f11bdf1Schristos.Xr crypt 3 . 776f11bdf1Schristos.Pp 786f11bdf1SchristosThe following options may be passed to the authentication module: 796f11bdf1Schristos.Bl -tag -width ".Cm use_first_pass" 806f11bdf1Schristos.It Cm debug 816f11bdf1Schristos.Xr syslog 3 826f11bdf1Schristosdebugging information at 836f11bdf1Schristos.Dv LOG_DEBUG 846f11bdf1Schristoslevel. 856f11bdf1Schristos.It Cm use_first_pass 866f11bdf1SchristosIf the authentication module 876f11bdf1Schristosis not the first in the stack, 886f11bdf1Schristosand a previous module 896f11bdf1Schristosobtained the user's password, 906f11bdf1Schristosthat password is used 916f11bdf1Schristosto authenticate the user. 926f11bdf1SchristosIf this fails, 936f11bdf1Schristosthe authentication module returns failure 946f11bdf1Schristoswithout prompting the user for a password. 956f11bdf1SchristosThis option has no effect 966f11bdf1Schristosif the authentication module 976f11bdf1Schristosis the first in the stack, 986f11bdf1Schristosor if no previous modules 996f11bdf1Schristosobtained the user's password. 1006f11bdf1Schristos.It Cm try_first_pass 1016f11bdf1SchristosThis option is similar to the 1026f11bdf1Schristos.Cm use_first_pass 1036f11bdf1Schristosoption, 1046f11bdf1Schristosexcept that if the previously obtained password fails, 1056f11bdf1Schristosthe user is prompted for another password. 1066f11bdf1Schristos.It Cm auth_as_self 1076f11bdf1SchristosThis option will require the user 1086f11bdf1Schristosto authenticate himself as the user 1096f11bdf1Schristosgiven by 1106f11bdf1Schristos.Xr getlogin 2 , 1116f11bdf1Schristosnot as the account they are attempting to access. 1126f11bdf1SchristosThis is primarily for services like 1136f11bdf1Schristos.Xr su 1 , 1146f11bdf1Schristoswhere the user's ability to retype 1156f11bdf1Schristostheir own password 1166f11bdf1Schristosmight be deemed sufficient. 1176f11bdf1Schristos.It Cm nullok 1186f11bdf1SchristosIf the password database 1196f11bdf1Schristoshas no password 1206f11bdf1Schristosfor the entity being authenticated, 1216f11bdf1Schristosthen this option 1226f11bdf1Schristoswill forgo password prompting, 1236f11bdf1Schristosand silently allow authentication to succeed. 12428836513Sthorpej.\" XXX This is not currently implemented. It's debatable whether or not 12528836513Sthorpej.\" XXX it should be. 12628836513Sthorpej.\" .It Cm passwd_db Ns = Ns Ar name 12728836513Sthorpej.\" Use only the specified password database. 12828836513Sthorpej.\" Valid password database names are: 12928836513Sthorpej.\" .Bl -tag -width files 13028836513Sthorpej.\" .It files 13128836513Sthorpej.\" local password file 13228836513Sthorpej.\" .It nis 13328836513Sthorpej.\" NIS password database 13428836513Sthorpej.\" .El 13528836513Sthorpej.\" .Pp 13628836513Sthorpej.\" If the user does not exist in the specified password database or if the 13728836513Sthorpej.\" system is not configured to use the specified password database, an 13828836513Sthorpej.\" authentication failure will occur. 1396f11bdf1Schristos.El 140*030d4fb5Sreed.Ss UNIX Account Management Module 1416f11bdf1SchristosThe 1426f11bdf1Schristos.Ux 1436f11bdf1Schristosaccount management component 1446f11bdf1Schristosprovides a function to perform account management, 1456f11bdf1Schristos.Fn pam_sm_acct_mgmt . 1466f11bdf1SchristosThe function verifies 1476f11bdf1Schristosthat the authenticated user 1486f11bdf1Schristosis allowed to login to the local user account 1496f11bdf1Schristosby checking the password expiry date. 1506f11bdf1Schristos.Pp 1516f11bdf1SchristosThe following options may be passed to the management module: 1526f11bdf1Schristos.Bl -tag -width ".Cm use_first_pass" 1536f11bdf1Schristos.It Cm debug 1546f11bdf1Schristos.Xr syslog 3 1556f11bdf1Schristosdebugging information at 1566f11bdf1Schristos.Dv LOG_DEBUG 1576f11bdf1Schristoslevel. 1586f11bdf1Schristos.El 159*030d4fb5Sreed.Ss UNIX Password Management Module 1606f11bdf1SchristosThe 1616f11bdf1Schristos.Ux 1626f11bdf1Schristospassword management component 1636f11bdf1Schristosprovides a function to perform account management, 1646f11bdf1Schristos.Fn pam_sm_chauthtok . 1656f11bdf1SchristosThe function changes 1666f11bdf1Schristosthe user's password. 1676f11bdf1Schristos.Pp 1686f11bdf1SchristosThe following options may be passed to the password module: 1696f11bdf1Schristos.Bl -tag -width ".Cm use_first_pass" 1706f11bdf1Schristos.It Cm debug 1716f11bdf1Schristos.Xr syslog 3 1726f11bdf1Schristosdebugging information at 1736f11bdf1Schristos.Dv LOG_DEBUG 1746f11bdf1Schristoslevel. 1756f11bdf1Schristos.It Cm no_warn 1766f11bdf1Schristossuppress warning messages to the user. 1776f11bdf1SchristosThese messages include 1786f11bdf1Schristosreasons why the user's 1796f11bdf1Schristosauthentication attempt was declined. 18028836513Sthorpej.It Cm passwd_db Ns = Ns Ar name 18128836513SthorpejChange the user's password only the specified password database. 18228836513SthorpejValid password database names are: 18328836513Sthorpej.Bl -tag -width files 18428836513Sthorpej.It files 18528836513Sthorpejlocal password file 18628836513Sthorpej.It nis 18728836513SthorpejNIS password database 18828836513Sthorpej.El 1896f11bdf1Schristos.El 1906f11bdf1Schristos.Sh FILES 1916f11bdf1Schristos.Bl -tag -width ".Pa /etc/master.passwd" -compact 1926f11bdf1Schristos.It Pa /etc/master.passwd 1936f11bdf1Schristosdefault 1946f11bdf1Schristos.Ux 1956f11bdf1Schristospassword database. 1966f11bdf1Schristos.El 1976f11bdf1Schristos.Sh SEE ALSO 1986f11bdf1Schristos.Xr passwd 1 , 1996f11bdf1Schristos.Xr getlogin 2 , 2006f11bdf1Schristos.Xr crypt 3 , 2016f11bdf1Schristos.Xr getpwent 3 , 2026f11bdf1Schristos.Xr syslog 3 , 2036f11bdf1Schristos.Xr nsswitch.conf 5 , 2046f11bdf1Schristos.Xr passwd 5 , 2059086769dSwiz.Xr nis 8 , 2066f11bdf1Schristos.Xr pam 8 207