AUTH_ENUMERATE(3)

✨ AUTH_ENUMERATE πŸ’…

okay bestie, welcome to auth_enumerate(3) β€” it's part of the S. Varshavchik cinematic universe (aka the Courier auth library, iykyk) and she is literally the friend who knows everybody. Sit down, get comfy, we're gonna spill the tea on how to get a whole list of accounts. πŸŽ€


🌸 NAME 🌸

auth_enumerate β€” Obtain list of accounts. that's it, that's the whole vibe. she collects accounts like we collect stickers. πŸ¦‹


✨ SYNOPSIS ✨

#include <courierauth.h>

auth_enumerate(int (*callback_func)
                (const char *, uid_t, gid_t, const char *,
               const char *, const char *, void *), void *callback_arg);

like, look at that function pointer. she's giving main character energy. 🫢


πŸ’– DESCRIPTION πŸ’–

So <pink>auth_enumerate</pink> enumerates all of the available accounts. all of them. the whole roster. no gatekeeping. πŸ’…

The way it works is: she repeatedly calls <purple>callback_func</purple>, once for each account. that's the whole thing. one call per account, like she's going down the group chat tagging everyone individually. ✨

Every time she calls <purple>callback_func</purple>, it receives these args, in this exact order:

  • The account name. πŸ‘‘
  • The account's numeric userid.
  • The account's numeric groupid.
  • The account's home directory. 🏠
  • The account's mailbox β€” if it's defined, and btw it may be NULL, which means "default mailbox location, bestie, idk go find it". 😭
  • The account's options string β€” again, if it's defined, and again it may be NULL.
  • <purple>callback_arg</purple>, verbatim. like, exactly as you passed it, no edits, no filter, no notes. 🫢

And here's the iconic part: after she invokes <purple>callback_func</purple> for the last account, she invokes <purple>callback_func</purple> one more time with all parameters set to NULL or 0. that's your little "we're done here, that's a wrap" signal. 🎬 periodt.

⚠️ but lowkey important: if <pink>auth_enumerate</pink> encounters an error, it will terminate without calling <purple>callback_func</purple> with all NULL or 0 parameters. so if you never get that final all-NULL/0 call, that's how you can tell whether a partial list of accounts was received. πŸ’€ no cap, that's the whole diagnostic trick.
πŸ“Œ Note Some back-end Courier authentication modules do not implement account enumeration, so this function may not be available in all configurations. sad but true, some backends just don't wanna be perceived. πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

go read the whole family, they're all slay. 🌈


⭐ NOTES ⭐

  1. authlib(3) https://www.courier-mta.org/authlib/authlib.html
  2. auth_generic_meta(3) https://www.courier-mta.org/authlib/auth_generic.html
  3. auth_login_meta(3) https://www.courier-mta.org/authlib/auth_login.html
  4. auth_getuserinfo_meta(3) https://www.courier-mta.org/authlib/auth_getuserinfo.html
  5. auth_passwd(3) https://www.courier-mta.org/authlib/auth_passwd.html

and that's the page!! πŸ’– written by S. Varshavchik, dated 01/11/2026, from the Courier auth lib situation β€” so when you cite her, cite her right, okay? mwah. 🧚🌸✨

πŸ“¦ where this page comes from