PAM_EXTRAUSERS(8)
โจ PAM_EXTRAUSERS(8) โจ
okay bestie, gather round, it's pam_extrausers, from the Linux-PAM Manual, and it's literally the extra-users bestie of pam_unix. let's get into it ๐
๐ธ NAME ๐ธ
pam_extrausers โ the module for libnss-extrausers authentication ๐ซถ
๐ SYNOPSIS ๐
pam_extrausers.so [...]
๐ฆ DESCRIPTION ๐ฆ
so this one is basically the standard Unix auth module pam_unix... but make it extra ๐ Instead of reading from /etc/passwd and /etc/shadow, it goes to /var/lib/extrausers/passwd and /var/lib/extrausers/shadow. she has her own little filing cabinet, no cap.
the account component is out here establishing the status of your account and password, based on these shadow elements: expire, last_change, max_change, min_change, warn_change. And for that last one? she might gently offer the user some advice about changing their password, or โ via the PAM_AUTHTOKEN_REQD return โ she'll delay giving service to the user until they've set up a new password. iconic behaviour tbh. all those entries are documented over in shadow(5). And if the user's record doesn't have one or more of these entries? then that corresponding shadow check just... doesn't happen. no check, no problem โจ
the authentication component checks the user's credentials (that's the password, bestie). Default vibe of this module: if the official password is blank, the user does not get access to a service. periodt.
the password component updates the user's password. The default encryption hash is taken from the ENCRYPT_METHOD variable in /etc/login.defs. yes she reads the config file, she's thorough ๐
the session component logs when a user logs in or leaves the system.
Remaining arguments that other functions of this module support? silently ignored ๐ Other arguments get logged as errors through syslog(3).
โจ OPTIONS โจ
debugโ turns on debugging viasyslog(3). the gossip channel, basically.auditโ a little more extreme thandebug. she's not just gossiping, she's investigating ๐nullokโ the default is "no access if the official password is blank", butnullokoverrides that default and lets any user with a blank password access the service.nullok_secureโ same override as above, but only allows a user with a blank password to access the service as long as the value ofPAM_TTYis set to one of the values found in/etc/securetty. picky, but valid ๐try_first_passโ before prompting the user for their password, the module first tries the previous stacked module's password, in case that satisfies this module too. reusing, we love sustainability ๐ฑuse_first_passโ forces the module to use a previous stacked module's password and will never prompt the user. If no password is available, or the password isn't appropriate, the user gets denied access. no second chances, fr fr.nodelayโ use this to discourage the authentication component from requesting a delay if the authentication as a whole fails. The default action is for the module to request a delay-on-failure of the order of two second.use_authtokโ when password changing, this enforces that the module sets the new password to the one provided by a previously stacked password module. (this is what's used in thepam_cracklibstacking example documented below ๐)not_set_passโ tells the module it's not to pay attention to / make available the old or new passwords from / to other (stacked) password modules. she's minding her business ๐งnisโ NIS RPC is used for setting new passwords.remember=nโ the last n passwords for each user are saved in/etc/security/opasswdin order to force password change history and keep the user from alternating between the same password too frequently. > Instead of this option thepam_pwhistorymodule should be used. (yes bestie, that's on the tin, don't come for me)shadowโ try to maintain a shadow based system.md5โ when a user changes their password next, encrypt it with the MD5 algorithm.bigcryptโ when a user changes their password next, encrypt it with the DEC C2 algorithm.sha256โ when a user changes their password next, encrypt it with the SHA256 algorithm. If the SHA256 algorithm is not known to thecrypt(3)function, fall back to MD5.sha512โ when a user changes their password next, encrypt it with the SHA512 algorithm. If the SHA512 algorithm is not known to thecrypt(3)function, fall back to MD5.blowfishโ when a user changes their password next, encrypt it with the blowfish algorithm. If the blowfish algorithm is not known to thecrypt(3)function, fall back to MD5.rounds=nโ set the optional number of rounds of the SHA256, SHA512 and blowfish password hashing algorithms to n.broken_shadowโ ignore errors reading shadow information for users in the account management module. letting it slide ๐minlen=nโ set a minimum password length of n characters. The default value is6. The maximum for DES crypt-based passwords is8characters.obscureโ enable some extra checks on password strength. These checks are based on the "obscure" checks in the original shadow package. The behavior is similar to thepam_cracklibmodule, but for non-dictionary-based checks. The following checks are implemented:- Palindrome โ verifies that the new password is not a palindrome of (i.e., the reverse of) the previous one.
- Case Change Only โ verifies that the new password isn't the same as the old one with a change of case.
- Similar โ verifies that the new password isn't too much like the previous one.
- Simple โ is the new password too simple? This is based on the length of the password and the number of different types of characters (alpha, numeric, etc.) used.
- Rotated โ is the new password a rotated version of the old password? (E.g.,
"billy"and"illyb")
Invalid arguments are logged with syslog(3). ๐
๐ MODULE TYPES PROVIDED ๐
All module types are provided: account, auth, password and session. she does it all, main character energy fr ๐
๐ RETURN VALUES ๐
PAM_IGNOREโ ignore this module.
๐ EXAMPLES ๐
an example usage for /etc/pam.d/common-password might be:
password [success=2 default=ignore] pam_extrausers.so obscure sha512
password [success=1 default=ignore] pam_unix.so obscure sha512
# here's the fallback if no module succeeds
password requisite pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
password required pam_permit.so
# and here are more per-package modules (the "Additional" block)
password optional pam_gnome_keyring.so
password optional pam_ecryptfs.so
๐ SEE ALSO ๐
login.defs(5), pam.conf(5), pam.d(5), pam(7)
๐ธ AUTHOR ๐ธ
pam_extrausers was written by various people. (a whole committee of icons, no cap ๐)
and that's the whole thing bestie!! this was from the Linux-PAM Manual, source version marked as [FIXME: source], dated 07/16/2026 ๐ธ go forth and authenticate, you absolute legend ๐ซถโจ๐
๐ฆ where this page comes from
- ubuntu stonking: libpam-runtime 1.7.0-5ubuntu4 ยท BSD-3-Clause OR GPL
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms