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 return PAM_NEW_AUTHTOK_REQD if 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 the pam_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 ✨ slay
  • PAM_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