PAM_ECHO(8)

๐Ÿ’ฌ NAME ๐Ÿ’ฌ

okay so bestie, meet pam_echo โ€” the PAM module that's literally just here to print text messages at you. it's the hype-woman of PAM. it says things. that's the whole job. iconic behaviour honestly ๐ŸŽ€


โœจ SYNOPSIS โœจ

pam_echo.so [file=/path/message]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so the pam_echo PAM module is for printing text messages to inform the user about special things. yes, its entire personality is "yapper" and we love that for it. ๐Ÿ’…

now here's the fun part: any sequence that starts with the % character gets interpreted like this ๐Ÿ‘‡

  • %H โ€” the name of the remote host (PAM_RHOST).
  • %h โ€” the name of the local host.
  • %s โ€” the service name (PAM_SERVICE).
  • %t โ€” the name of the controlling terminal (PAM_TTY).
  • %U โ€” the remote user name (PAM_RUSER).
  • %u โ€” the local user name (PAM_USER).

and every other sequence that begins with %? it just expands to the characters following that % character. no cap. it doesn't try to be clever, it just vibe-checks the % and moves on. ๐ŸŒธ


๐ŸŒˆ OPTIONS ๐ŸŒˆ

  • file=/path/message โ€” the content of the file /path/message will be printed with the PAM conversion function as PAM_TEXT_INFO. basically: point it at a file, it reads the file, it yells the file at your user. ๐Ÿซถ

๐Ÿ‘‘ MODULE TYPES PROVIDED ๐Ÿ‘‘

all module types are provided, bestie โ€” auth, account, password and session. all four. main character energy across the board. periodt. โญ


๐Ÿ’€ RETURN VALUES ๐Ÿ’€

  • PAM_BUF_ERR โ€” memory buffer error. ๐Ÿ˜ญ
  • PAM_SUCCESS โ€” message was successfully printed. slay, it did the thing! ๐Ÿ”ฅ
  • PAM_IGNORE โ€” the PAM_SILENT flag was given, or the message file does not exist, so no message was printed. it's giving "read the room and said nothing." ๐Ÿ™ˆ

๐Ÿ“ EXAMPLES ๐Ÿ“

for an example of the use of this module, we show how it may be used to print information about good passwords:

password optional pam_echo.so file=/usr/share/doc/good-password.txt
password required pam_unix.so

see how the optional is doing the heavy lifting there? it's the chill one. the required pam_unix.so is the one actually taking notes. ๐Ÿ“


๐Ÿงš SEE ALSO ๐Ÿงš

pam.conf(8), pam.d(5), pam(8) โ€” go read those too, iykyk. ๐Ÿ’œ


๐ŸŒธ AUTHOR ๐ŸŒธ

Thorsten Kukuk <kukuk@thkukuk.de> โ€” thank you for this tiny legend ๐Ÿซถ


and that's the whole page bestie!! this was PAM_ECHO(8) from the Linux-PAM Manual, dated 09/27/2026, brought to you by the Linux-PAM girlies. no message left unprinted. mwah ๐Ÿ’–โœจ
๐Ÿ“ฆ where this page comes from