PAM_WTMPDB(8)
๐ PAM_WTMPDB(8) โ pam_wtmpdb ๐
okay bestie, sit down, hydrate, because we're talking about the little PAM module that keeps receipts on when you log in and when you log out ๐ซถ
โจ NAME โจ
pam_wtmpdb โ a PAM module that records login and logout times of users. it's giving timekeeper. it's giving someone is watching your 3am logins ๐
๐ธ SYNOPSIS ๐ธ
pam_wtmpdb.so [debug] [silent] [skip_if=<services>] [database=<file>]
๐ฆ DESCRIPTION ๐ฆ
so pam_wtmpdb is a PAM module that records the login and logout information of the user. literally its whole personality. it uses /var/log/wtmp.db as its database file to store all that information, no cap ๐๏ธโจ
and compared to some wtmp(5) implementations? this PAM module is Y2038 safe and uses sqlite3 to store the information. future-proof queen behavior, we love to see it ๐
๐ OPTIONS ๐
debugโ print debug information. spill the tea about what's happening internally ๐silentโ avoid all messages except errors. quiet luxury, but for logging ๐คซskip_if=<services>โ the argument services is a comma separated list of PAM services. if a service is listed here, no wtmpdb entry is written. so basically "don't record me for these, thank you next" ๐database=<file>โ use file instead of/var/log/wtmp.db. you can have your db wherever you want, main character energy ๐
๐ MODULE TYPES PROVIDED ๐
the session module type is provided for updating the wtmp database with the login and logout information about an user. session only, and it ate ๐
โญ RETURN VALUES โญ
PAM_SUCCESSโ everything was successful. slay, we love a clean run โจPAM_SERVICE_ERRโ internal service module error. this includes error reading from or writing to the database. the db said "not today" ๐ญPAM_USER_UNKNOWNโ user not known. who is she? we don't know her ๐PAM_IGNOREโ returned by service types which do nothing. it's just vibing, doing absolutely nothing, and that's valid ๐ง
๐ EXAMPLES ๐
add the following line to e.g. /etc/pam.d/login to display the last login time of a user:
session required pam_wtmpdb.so
one line. one line and your logins are getting documented. iconic honestly ๐ซถ
๐ FILES ๐
/var/log/wtmp.dbโ the wtmpdb logging database file ๐/var/lib/wtmpdb/wtmp.dbโ a symbolic link from the upstream location to the above database file ๐
๐ SEE ALSO ๐
wtmpdb(8), pam.conf(5), pam.d(5), pam(8)
go read those too, bestie, i'm not doing all the homework for you ๐
๐ AUTHOR ๐
pam_wtmpdb was written by Thorsten Kukuk <kukuk@suse.com>. thank you king, we appreciate you ๐
and that's the whole page, fr fr. no notes. periodt. ๐
this has been wtmpdb 0.75.0, dated 12/02/2025, signing off โ stay safe, stay logged, stay Y2038-ready babes ๐ฆโจ
๐ฆ where this page comes from
- ubuntu resolute: libpam-wtmpdb 0.75.0-5ubuntu1 ยท BSD-2-Clause
- ubuntu stonking: libpam-wtmpdb 0.75.0-5ubuntu1 ยท BSD-2-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms