Password Management Function: PAM_EXTERN int pam_sm_chauthtok(pam_handle_t* pamh, int flags, int argc, const char** argv); Macro used: PAM_SM_PASSWORD The function instructs the module that the user's authentication token should be set. The input flags may contian any of the following (possibly OR'd with PAM_SILENT): PAM_CHANGE_EXPIRED_AUTHTOK - the authentication token should be changed only if it expired. PAM_PRELIM_CHECK - the module should only verify that changing the authentication token is possible (e.g. network connection to a password server is available). PAM_UPDATE_AUTHTOK - the module should actually change the authentication token. The PAM library will invoke this function twice - once with PAM_PRELIM_CHECK, and then with PAM_PRELIM_CHECK.