PAM_TIMESTAMP(8)

๐Ÿ’– pam_timestamp โ€” bestie's guide to the vibes ๐Ÿ’–

okay so this is pam_timestamp from the Linux-PAM Manual, section 8 (that's the sysadmin section, iykyk). it's a PAM module. it remembers that you already logged in so you don't have to do it again five seconds later. iconic behaviour, honestly.


โœจ NAME โœจ

pam_timestamp โ€” authenticate using cached successful authentication attempts ๐ŸŽ€

like. it literally caches your W's and reuses them. no cap.


๐ŸŒธ SYNOPSIS ๐ŸŒธ

pam_timestamp.so [timestampdir=directory] [timestamp_timeout=number]
                 [verbose] [debug]

that's it bestie, four optional lil arguments. she's low maintenance ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

in a nutshell โ€” and I am putting you in a nutshell for this one โ€” pam_timestamp caches successful authentication attempts, and lets you use a recent successful attempt as the basis for authentication. it's the same kind of mechanism that's used in sudo. yes, that sudo. the one you type before every single command because you forgot to su again. ๐Ÿซถ

here's the tea on how it actually works:

when an application opens a session using pam_timestamp, a timestamp file gets created in the timestampdir directory for the user. that's the little receipt of your success โœจ

then, when an application tries to authenticate the user, pam_timestamp will treat a sufficiently recent timestamp file as grounds for succeeding. boom. no password prompt. you're in. periodt. ๐Ÿ’…


โญ OPTIONS โญ

  • timestampdir= directory โ€” specify an alternate directory where pam_timestamp creates timestamp files. like, if you want your receipts filed somewhere else. go off, organise your life. ๐ŸŽ€
  • timestamp_timeout= number โ€” how long should pam_timestamp treat the timestamp as valid after its last modification date, measured in seconds. default is 300 seconds. so five minutes of freedom, bestie. use them wisely. โณ
  • verbose โ€” attempt to inform the user when access is granted. she'll tell you when you ate. ๐Ÿ”ฅ
  • debug โ€” turns on debugging messages sent to syslog(3). for when you need the receipts about the receipts. ๐Ÿ™ˆ

๐Ÿ‘‘ MODULE TYPES PROVIDED ๐Ÿ‘‘

the auth and session module types are provided. two for the price of one, we love a multitasker. ๐Ÿ’œ


๐ŸŒˆ RETURN VALUES ๐ŸŒˆ

  • PAM_AUTH_ERR โ€” the module was not able to retrieve the user name, or no valid timestamp file was found. basically: couldn't find you, couldn't find your receipt. tragic. ๐Ÿ˜ญ
  • PAM_SUCCESS โ€” everything was successful. ATE. LEFT NO CRUMBS. โœจ
  • PAM_SESSION_ERR โ€” the timestamp file could not be created or updated. the receipt machine broke. ๐Ÿ’€

๐Ÿ’€ NOTES ๐Ÿ’€

users can get confused when they are not always asked for passwords when running a given program. some users reflexively begin typing information before noticing that it is not being asked for.

not me typing my whole password into a prompt that already let me in ๐Ÿซ  yeah so. heads up bestie. if your password is suddenly appearing on screen in plain text, it's because nobody asked. look before you type. ๐ŸŽ€


๐Ÿงš EXAMPLES ๐Ÿงš

here's the exact setup, copy it, don't freestyle it:

auth sufficient pam_timestamp.so verbose
auth required   pam_unix.so

session required pam_unix.so
session optional pam_timestamp.so

sufficient for the timestamp, required for pam_unix.so as the fallback โ€” so if the timestamp isn't fresh, you just get asked normally. and on the session side, pam_unix.so is required while pam_timestamp.so is optional. the way this is structured? chef's kiss. ๐ŸคŒ


๐Ÿ“ FILES ๐Ÿ“

  • /var/run/pam_timestamp/... โ€” timestamp files and directories. that's where the receipts live. ๐Ÿ“

๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

go read them, they're all part of the same little PAM family reunion. ๐Ÿ’–


๐Ÿ’œ AUTHOR ๐Ÿ’œ

pam_timestamp was written by Nalin Dahyabhai. thank you for your service, king. ๐Ÿ‘‘


okay that's the whole page, you're all caught up bestie ๐Ÿซถ this was the Linux-PAM Manual version, dated 09/27/2026. go forth and timestamp responsibly. mwah. ๐Ÿ’‹โœจ

๐Ÿ“ฆ where this page comes from