1PAM_SM_CHAUTHTOK(3) Linux-PAM Manual PAM_SM_CHAUTHTOK(3)
2
3
4
6 pam_sm_chauthtok - PAM service function for authentication token
7 management
8
10 #define PAM_SM_PASSWORD
11
12 #include <security/pam_modules.h>
13
14 int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc,
15 const char **argv);
16
18 The pam_sm_chauthtok function is the service module's implementation of
19 the pam_chauthtok(3) interface.
20
21 This function is used to (re-)set the authentication token of the user.
22
23 Valid flags, which may be logically OR'd with PAM_SILENT, are:
24
25 PAM_SILENT
26 Do not emit any messages.
27
28 PAM_CHANGE_EXPIRED_AUTHTOK
29 This argument indicates to the module that the user's
30 authentication token (password) should only be changed if it has
31 expired. This flag is optional and must be combined with one of the
32 following two flags. Note, however, the following two options are
33 mutually exclusive.
34
35 PAM_PRELIM_CHECK
36 This indicates that the modules are being probed as to their ready
37 status for altering the user's authentication token. If the module
38 requires access to another system over some network it should
39 attempt to verify it can connect to this system on receiving this
40 flag. If a module cannot establish it is ready to update the user's
41 authentication token it should return PAM_TRY_AGAIN, this
42 information will be passed back to the application.
43
44 If the control value sufficient is used in the password stack, the
45 PAM_PRELIM_CHECK section of the modules following that control
46 value is not always executed.
47
48 PAM_UPDATE_AUTHTOK
49 This informs the module that this is the call it should change the
50 authorization tokens. If the flag is logically OR'd with
51 PAM_CHANGE_EXPIRED_AUTHTOK, the token is only changed if it has
52 actually expired.
53
54 The PAM library calls this function twice in succession. The first time
55 with PAM_PRELIM_CHECK and then, if the module does not return
56 PAM_TRY_AGAIN, subsequently with PAM_UPDATE_AUTHTOK. It is only on the
57 second call that the authorization token is (possibly) changed.
58
60 PAM_AUTHTOK_ERR
61 The module was unable to obtain the new authentication token.
62
63 PAM_AUTHTOK_RECOVERY_ERR
64 The module was unable to obtain the old authentication token.
65
66 PAM_AUTHTOK_LOCK_BUSY
67 Cannot change the authentication token since it is currently
68 locked.
69
70 PAM_AUTHTOK_DISABLE_AGING
71 Authentication token aging has been disabled.
72
73 PAM_PERM_DENIED
74 Permission denied.
75
76 PAM_TRY_AGAIN
77 Preliminary check was unsuccessful. Signals an immediate return to
78 the application is desired.
79
80 PAM_SUCCESS
81 The authentication token was successfully updated.
82
83 PAM_USER_UNKNOWN
84 User unknown to password service.
85
87 pam(3), pam_chauthtok(3), pam_sm_chauthtok(3), pam_strerror(3), PAM(8)
88
89
90
91Linux-PAM Manual 05/18/2017 PAM_SM_CHAUTHTOK(3)