pam_chauthtok — perform password related functions within the PAM framework
[ flag ... ] file ...
[ library ... ]
int pam_chauthtok(pam_handle_t *pamh,
is called to change the authentication token
associated with a particular user
referenced by the authentication handle,
The following flag may be passed in to
The password service should not generate any messages.
The password service should only update those passwords that have aged.
If this flag is not passed,
all password services should update their passwords.
Upon successful completion of the call, the authentication
token of the user will be changed in accordance with the
password service configured in the system through
is typically used by a
application which has determined that the user's password has aged or expired.
Before allowing the user to login, the
application may invoke
with this flag to allow the user to update the password.
Typically applications such as
should not use this flag.
performs a preliminary check before attempting to update
passwords. This check is performed for each
password module in the stack as listed in
The check may include pinging remote name services to determine
if they are available. If
then the check has failed, and passwords are not updated.
for information on thread-safety of PAM interfaces.
Upon successful completion,
In addition to the error return values described in
the following values may be returned:
Authentication token manipulation error.
Authentication information cannot be recovered.
Authentication token lock busy.
Authentication token aging disabled.
User unknown to password service.
Preliminary check by password service failed.