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 PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
15 int argc, 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 users authentication
30 token (password) should only be changed if it has expired. This flag
31 is optional and must be combined with one of the following two
32 flags. Note, however, the following two options are mutually
33 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 PAM_UPDATE_AUTHTOK
45 This informs the module that this is the call it should change the
46 authorization tokens. If the flag is logically OR'd with
47 PAM_CHANGE_EXPIRED_AUTHTOK, the token is only changed if it has
48 actually expired.
49
50 The PAM library calls this function twice in succession. The first time
51 with PAM_PRELIM_CHECK and then, if the module does not return
52 PAM_TRY_AGAIN, subsequently with PAM_UPDATE_AUTHTOK. It is only on the
53 second call that the authorization token is (possibly) changed.
54
56 PAM_AUTHTOK_ERR
57 The module was unable to obtain the new authentication token.
58
59 PAM_AUTHTOK_RECOVERY_ERR
60 The module was unable to obtain the old authentication token.
61
62 PAM_AUTHTOK_LOCK_BUSY
63 Cannot change the authentication token since it is currently locked.
64
65 PAM_AUTHTOK_DISABLE_AGING
66 Authentication token aging has been disabled.
67
68 PAM_PERM_DENIED
69 Permission denied.
70
71 PAM_TRY_AGAIN
72 Preliminary check was unsuccessful. Signals an immediate return to
73 the application is desired.
74
75 PAM_SUCCESS
76 The authentication token was successfully updated.
77
78 PAM_USER_UNKNOWN
79 User unknown to password service.
80
82 pam(3), pam_chauthtok(3), pam_sm_chauthtok(3), pam_strerror(3), PAM(8)
83
84
85
86Linux-PAM Manual 06/27/2006 PAM_SM_CHAUTHTOK(3)