'\" te .\" Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. .TH pam_unix_auth 5 "21 Dec 2011" "SunOS 5.11" "Standards, Environments, and Macros" .SH NAME pam_unix_auth \- PAM authentication module for UNIX .SH SYNOPSIS .LP .nf \fBpam_unix_auth.so.1\fR .fi .SH DESCRIPTION .sp .LP The \fBpam_unix_auth\fR module implements \fBpam_sm_authenticate()\fR, which provides functionality to the PAM authentication stack. It provides functions that use \fBcrypt\fR(3C) to verify that the password contained in the \fBPAM\fR item \fBPAM_AUTHTOK\fR is the correct password for the user specified in the item \fBPAM_USER\fR. .sp .LP If \fBPAM_AUSER\fR and \fBPAM_USER\fR are both specified and \fBPAM_USER\fR is a role, the \fBuser_attr\fR(4) keyword \fBroleauth\fR is checked to determine if the password that is checked is for the role (\fBPAM_USER\fR) or the assuming user (\fBPAM_AUSER\fR). If \fBPAM_REPOSITORY\fR is specified, the user's pass word is fetched from that repository. Otherwise, the default \fBnsswitch.conf\fR(4) repository is searched for that user. .sp .LP For accounts in the name services which support automatic account locking, the account can be configured to be automatically locked (see \fBuser_attr\fR(4) and \fBpolicy.conf\fR(4)) after multiple failed login attempts. For accounts that are configured for automatic locking, if authentication failure is to be returned, the failed login counter is incremented upon each failure. If the number of successive failures equals or exceeds the configured value, the account is locked and \fBPAM_MAXTRIES\fR is returned. The \fBfiles\fR (see \fBpasswd\fR(4) and \fBshadow\fR(4)) and \fBldap\fR (when configured with \fBenableShadowUpdate true\fR, see \fBldapclient\fR(1M)), repositories support automatic account locking. A successful authentication by this module clears the failed login counter and reports the number of failed attempts since the last successful authentication. .sp .LP Authentication service modules must implement both \fBpam_sm_authenticate()\fR and \fBpam_sm_setcred()\fR. To allow the authentication portion of UNIX authentication to be replaced, \fBpam_sm_setcred()\fR in this module always returns \fBPAM_IGNORE\fR. This module should be stacked with \fBpam_unix_cred\fR(5) to ensure a successful return from \fBpam_setcred\fR(3PAM). .sp .LP The following options can be passed to the module: .sp .ne 2 .mk .na \fB\fBnowarn\fR\fR .ad .sp .6 .RS 4n Turn off warning messages. .RE .sp .ne 2 .mk .na \fB\fBserver_policy\fR\fR .ad .sp .6 .RS 4n If the account authority for the user, as specified by \fBPAM_USER\fR, is a server, do not apply the UNIX policy from the \fBpasswd\fR entry in the name service switch. .RE .sp .ne 2 .mk .na \fB\fBnolock\fR\fR .ad .sp .6 .RS 4n Regardless of the automatic account locking setting for the account, do not lock the account, increment or clear the failed login count. The \fBnolock\fR option allows for exempting account locking on a per service basis. .RE .SH ERRORS .sp .LP The following error codes are returned from \fBpam_sm_authenticate()\fR: .sp .ne 2 .mk .na \fB\fBPAM_AUTH_ERR\fR\fR .ad .sp .6 .RS 4n Authentication failure. .RE .sp .ne 2 .mk .na \fB\fBPAM_BUF_ERR\fR\fR .ad .sp .6 .RS 4n Memory buffer error. .RE .sp .ne 2 .mk .na \fB\fBPAM_IGNORE\fR\fR .ad .sp .6 .RS 4n Ignores module, not participating in result. .RE .sp .ne 2 .mk .na \fB\fBPAM_MAXTRIES\fR\fR .ad .sp .6 .RS 4n Maximum number of retries exceeded. .RE .sp .ne 2 .mk .na \fB\fBPAM_PERM_DENIED\fR\fR .ad .sp .6 .RS 4n Permission denied. .RE .sp .ne 2 .mk .na \fB\fBPAM_SUCCESS\fR\fR .ad .sp .6 .RS 4n Successfully obtains authentication token. .RE .sp .ne 2 .mk .na \fB\fBPAM_SYSTEM_ERR\fR\fR .ad .sp .6 .RS 4n System error. .RE .sp .ne 2 .mk .na \fB\fBPAM_USER_UNKNOWN\fR\fR .ad .sp .6 .RS 4n No account present for user. .RE .sp .LP The following error codes are returned from \fBpam_sm_setcred()\fR: .sp .ne 2 .mk .na \fB\fBPAM_IGNORE\fR\fR .ad .sp .6 .RS 4n Ignores this module regardless of the control flag. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT LevelMT-Safe with exceptions .TE .SH SEE ALSO .sp .LP \fBlogin\fR(1), \fBpasswd\fR(1), \fBldapclient\fR(1M), \fBuseradd\fR(1M), \fBusermod\fR(1M), \fBroleadd\fR(1M), \fBrolemod\fR(1M), \fBcrypt\fR(3C), \fBlibpam\fR(3LIB), \fBpam\fR(3PAM), \fBpam_authenticate\fR(3PAM), \fBpam_setcred\fR(3PAM), \fBsyslog\fR(3C), \fBpam.conf\fR(4), \fBpasswd\fR(4), \fBpolicy.conf\fR(4), \fBnsswitch.conf\fR(4), \fBshadow\fR(4), \fBuser_attr\fR(4), \fBattributes\fR(5), \fBpam_authtok_check\fR(5), \fBpam_authtok_get\fR(5), \fBpam_authtok_store\fR(5), \fBpam_dhkeys\fR(5), \fBpam_passwd_auth\fR(5), \fBpam_unix_account\fR(5), \fBpam_unix_session\fR(5) .SH NOTES .sp .LP The interfaces in \fBlibpam\fR(3LIB) are MT-Safe only if each thread within the multi-threaded application uses its own \fBPAM\fR handle. .sp .LP If the \fBPAM_REPOSITORY\fR \fIitem_type\fR is set and a service module does not recognize the type, the service module does not process any information, and returns \fBPAM_IGNORE\fR. If the \fBPAM_REPOSITORY\fR \fIitem_type\fR is not set, a service module performs its default action.