2 .\" Copyright (c) 2007, Sun Microsystems, Inc.
3 .\" All Rights Reserved
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH PAM_CHAUTHTOK 3PAM "Mar 1, 2005"
9 pam_chauthtok \- perform password related functions within the PAM framework
13 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lpam\fR [ \fIlibrary\fR ... ]
14 #include <security/pam_appl.h>
16 \fBint\fR \fBpam_chauthtok\fR(\fBpam_handle_t *\fR\fIpamh\fR, \fBconst int\fR \fIflags\fR);
22 The \fBpam_chauthtok()\fR function is called to change the authentication token
23 associated with a particular user referenced by the authentication handle
27 The following flag may be passed in to \fBpam_chauthtok()\fR:
31 \fB\fBPAM_SILENT\fR\fR
34 The password service should not generate any messages.
40 \fB\fBPAM_CHANGE_EXPIRED_AUTHTOK\fR\fR
43 The password service should only update those passwords that have aged. If this
44 flag is not passed, all password services should update their passwords.
50 \fB\fBPAM_NO_AUTHTOK_CHECK\fR\fR
53 The password service should not perform conformance checks on the password
59 Upon successful completion of the call, the authentication token of the user
60 will be changed in accordance with the password service configured in the
61 system through \fBpam.conf\fR(4).
65 Upon successful completion, \fBPAM_SUCCESS\fR is returned. In addition to the
66 error return values described in \fBpam\fR(3PAM), the following values may be
71 \fB\fBPAM_PERM_DENIED\fR\fR
80 \fB\fBPAM_AUTHTOK_ERR\fR\fR
83 Authentication token manipulation error.
89 \fB\fBPAM_AUTHTOK_RECOVERY_ERR\fR\fR
92 Authentication information cannot be recovered.
98 \fB\fBPAM_AUTHTOK_LOCK_BUSY\fR\fR
101 Authentication token lock busy.
107 \fB\fBPAM_AUTHTOK_DISABLE_AGING\fR\fR
110 Authentication token aging disabled.
116 \fB\fBPAM_USER_UNKNOWN\fR\fR
119 User unknown to password service.
125 \fB\fBPAM_TRY_AGAIN\fR\fR
128 Preliminary check by password service failed.
134 See \fBattributes\fR(5) for description of the following attributes:
142 ATTRIBUTE TYPE ATTRIBUTE VALUE
144 Interface Stability Stable
146 MT-Level MT-Safe with exceptions
152 \fBlogin\fR(1), \fBpasswd\fR(1), \fBpam\fR(3PAM), \fBpam_authenticate\fR(3PAM),
153 \fBpam_start\fR(3PAM), \fBattributes\fR
157 The flag \fBPAM_CHANGE_EXPIRED_AUTHTOK\fR is typically used by a \fBlogin\fR
158 application which has determined that the user's password has aged or expired.
159 Before allowing the user to login, the \fBlogin\fR application may invoke
160 \fBpam_chauthtok()\fR with this flag to allow the user to update the password.
161 Typically, applications such as \fBpasswd\fR(1) should not use this flag.
164 The \fBpam_chauthtok()\fR functions performs a preliminary check before
165 attempting to update passwords. This check is performed for each password
166 module in the stack as listed in \fBpam.conf\fR(4). The check may include
167 pinging remote name services to determine if they are available. If
168 \fBpam_chauthtok()\fR returns \fBPAM_TRY_AGAIN\fR, then the check has failed,
169 and passwords are not updated.
172 The flag \fBPAM_NO_AUTHTOK_CHECK\fR is typically used by programs that allow an
173 administrator to bypass various password conformance checks when setting a
177 The interfaces in \fBlibpam\fR are MT-Safe only if each thread within the
178 multithreaded application uses its own \fBPAM\fR handle.