PAM_ACCT_MGMT(3)
π PAM_ACCT_MGMT(3) π
okay so bestie, welcome to pam_acct_mgmt β the Linux-PAM Manual page that's literally all about account validation management. no cap, this is the vibe check for user accounts β¨
πΈ SYNOPSIS πΈ
#include <security/pam_appl.h>
int pam_acct_mgmt(pam_handle_t *pamh, int flags);
π DESCRIPTION π
so like, the pam_acct_mgmt function is the one that decides whether a user's account is actually valid β it's giving gatekeeper energy π
it checks for authentication token expiration and account expiration, and it verifies access restrictions too. the way it usually works is you call it after the user has already been authenticated (like, they proved who they are, and now we're checking if their account is still allowed to do stuff).
the pamh argument is an authentication handle you got from a prior call to pam_start(). and the flags argument is the binary or of zero or more of these values:
β¨ the flags β¨
PAM_SILENTβ do not emit any messages. like, stay quiet, no talking π€«PAM_DISALLOW_NULL_AUTHTOKβ the PAM module service should returnPAM_NEW_AUTHTOK_REQDif the user has a null authentication token. periodt.
π¦ RETURN VALUES π¦
PAM_ACCT_EXPIREDβ the user account has expired πPAM_AUTH_ERRβ authentication failure πPAM_NEW_AUTHTOK_REQDβ the user account is valid but their authentication token is expired. the correct response to this return value is to require that the user satisfies thepam_chauthtok()function before obtaining service. lowkey though, it may not be possible for some applications to do this β in such cases, the user should be denied access until such time as they can update their password. sorry bestie πPAM_PERM_DENIEDβ permission denied π«PAM_SUCCESSβ the authentication token was successfully updated β¨ slayPAM_USER_UNKNOWNβ user unknown to password service π»
π SEE ALSO π
pam_start(3), pam_authenticate(3), pam_chauthtok(3), pam_strerror(3), pam(8)
and that's the whole page, bestie π«Ά this lil masterpiece is from the Linux-PAM crew, dated 07/08/2026 β go forth and validate those accounts π
π¦ 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