PAM_CHAUTHTOK(3)
okay bestie, welcome to the PAM_CHAUTHTOK(3) manual page β the one and only glow-up guide for updating authentication tokens. π β¨ this is literally the moment your password gets a whole new vibe, and i'm obsessed. let's get into it. π
π NAME π
pam_chauthtok β updating authentication tokens. that's the whole assignment. no cap, it's the function that changes the authentication token (password, bestie) for a user, and it's giving main character energy. ππ
β¨ SYNOPSIS β¨
#include <security/pam_appl.h>
int pam_chauthtok(pam_handle_t *pamh, int flags);
π¦ DESCRIPTION π¦
okay so the pam_chauthtok function is literally used to change the authentication token for a given user β and by "given user" we mean whatever user state is associated with the handle pamh. no cap, it's the whole "new password, who dis?" moment. π«Ά
so like, pamh is an authentication handle you got from a prior call to pam_start(). you know, the classic. and flags is the binary or of zero or more of the following values β yes, you can stack them, it's a whole vibe check:
PAM_SILENTβ do not emit any messages. literally: no messages, no noise, just silence. π€«PAM_CHANGE_EXPIRED_AUTHTOKβ this one tells the modules that the user's authentication token (password) should only be changed if it has expired. if you don't pass this argument, the application requires that all authentication tokens are to be changed. so it's like "only if expired" vs "change everything", and that's the tea. π΅
π₯ RETURN VALUES π₯
bestie, here's the vibe check on what this function can return. pay attention, iykyk. π
PAM_AUTHTOK_ERRβ a module was unable to obtain the new authentication token. it's giving "couldn't get the new password" energy. πPAM_AUTHTOK_RECOVERY_ERRβ a module was unable to obtain the old authentication token. so like, the old password retrieval flopped. πPAM_AUTHTOK_LOCK_BUSYβ one or more of the modules was unable to change the authentication token since it is currently locked. locked out of the glow-up, literally. πPAM_AUTHTOK_DISABLE_AGINGβ authentication token aging has been disabled for at least one of the modules. aging? disabled? for at least one module? periodt. πPAM_PERM_DENIEDβ permission denied. that's it. that's the tweet. π«PAM_SUCCESSβ the authentication token was successfully updated. slay! the glow-up worked. β¨πPAM_TRY_AGAINβ not all of the modules were in a position to update the authentication token(s). in such a case none of the user's authentication tokens are updated. so like, if one module can't go, nobody goes. it's a whole group project vibe. ππ«Ά
bestie, if you get PAM_TRY_AGAIN, none of the tokens are updated. so like, don't panic but also maybe panic a little. π
PAM_USER_UNKNOWNβ user unknown to password service. literally who? π€
π SEE ALSO π
go check out these icons, bestie: pam_start(3), pam_authenticate(3), pam_setcred(3), pam_get_item(3), pam_strerror(3), pam(8). they're all in the same friend group, iykyk. π
anyway bestie, that's the tea on PAM_CHAUTHTOK(3). this page is from Linux-PAM, dated 07/08/2026, and it's literally the PAM_CHAUTHTOK(3) manual page. mwah πβ¨
π¦ where this page comes from
- fedora 44: pam-devel 1.7.2-2.fc44 Β· BSD-3-Clause AND GPL-2.0-or-later
- fedora 44: pam-devel 1.7.2-2.fc44 Β· BSD-3-Clause AND GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms