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