1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
4 <refentry id='pam_chauthtok'>
6 <refentrytitle>pam_chauthtok</refentrytitle>
7 <manvolnum>3</manvolnum>
8 <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
11 <refnamediv id="pam_chauthtok-name">
12 <refname>pam_chauthtok</refname>
13 <refpurpose>updating authentication tokens</refpurpose>
16 <!-- body begins here -->
19 <funcsynopsis id='pam_chauthtok-synopsis'>
20 <funcsynopsisinfo>#include <security/pam_appl.h></funcsynopsisinfo>
22 <funcdef>int <function>pam_chauthtok</function></funcdef>
23 <paramdef>pam_handle_t *<parameter>pamh</parameter></paramdef>
24 <paramdef>int <parameter>flags</parameter></paramdef>
30 <refsect1 id='pam_chauthtok-description'>
31 <title>DESCRIPTION</title>
33 The <function>pam_chauthtok</function> function is used to change the
34 authentication token for a given user (as indicated by the state
35 associated with the handle <emphasis>pamh</emphasis>).
38 The <emphasis>pamh</emphasis> argument is an authentication
39 handle obtained by a prior call to pam_start().
40 The flags argument is the binary or of zero or more of the
45 <term>PAM_SILENT</term>
48 Do not emit any messages.
53 <term>PAM_CHANGE_EXPIRED_AUTHTOK</term>
56 This argument indicates to the modules that the users
57 authentication token (password) should only be changed
59 If this argument is not passed, the application requires
60 that all authentication tokens are to be changed.
67 <refsect1 id="pam_chauthtok-return_values">
68 <title>RETURN VALUES</title>
71 <term>PAM_AUTHTOK_ERR</term>
74 A module was unable to obtain the new authentication token.
79 <term>PAM_AUTHTOK_RECOVERY_ERR</term>
82 A module was unable to obtain the old authentication token.
87 <term>PAM_AUTHTOK_LOCK_BUSY</term>
90 One or more of the modules was unable to change the
91 authentication token since it is currently locked.
96 <term>PAM_AUTHTOK_DISABLE_AGING</term>
99 Authentication token aging has been disabled for at least
105 <term>PAM_PERM_DENIED</term>
113 <term>PAM_SUCCESS</term>
116 The authentication token was successfully updated.
121 <term>PAM_TRY_AGAIN</term>
124 Not all of the modules were in a position to update the
125 authentication token(s). In such a case none of the user's
126 authentication tokens are updated.
131 <term>PAM_USER_UNKNOWN</term>
134 User unknown to password service.
141 <refsect1 id='pam_chauthtok-see_also'>
142 <title>SEE ALSO</title>
145 <refentrytitle>pam_start</refentrytitle><manvolnum>3</manvolnum>
148 <refentrytitle>pam_authenticate</refentrytitle><manvolnum>3</manvolnum>
151 <refentrytitle>pam_setcred</refentrytitle><manvolnum>3</manvolnum>
154 <refentrytitle>pam_get_item</refentrytitle><manvolnum>3</manvolnum>
157 <refentrytitle>pam_strerror</refentrytitle><manvolnum>3</manvolnum>
160 <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>