'\" t .\" Title: pam_wtmpdb .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.79.2 .\" Date: 11/18/2025 .\" Manual: pam_wtmpdb .\" Source: wtmpdb 0.75.0 .\" Language: English .\" .TH "PAM_WTMPDB" "8" "11/18/2025" "wtmpdb 0.75.0" "pam_wtmpdb" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" pam_wtmpdb \- PAM module to record login and logout times of users .SH "SYNOPSIS" .HP \w'\fBpam_wtmpdb\&.so\fR\ 'u \fBpam_wtmpdb\&.so\fR [debug] [silent] [skip_if=] [database=] .SH "DESCRIPTION" .PP pam_wtmpdb is a PAM module to record the login and logout information of the user\&. The module uses /var/lib/wtmpdb/wtmp\&.db as database file to store all information\&. .PP Compared to some \fBwtmp\fR(5) implementations this PAM module is Y2038 safe and uses sqlite3 to store the information\&. .SH "OPTIONS" .PP debug .RS 4 Print debug information\&. .RE .PP silent .RS 4 Avoid all messages except errors\&. .RE .PP skip_if= .RS 4 The argument \fBservices\fR is a comma separated list of PAM services\&. If a service is listed here, no wtmpdb entry is written\&. .RE .PP database= .RS 4 Use \fBfile\fR instead of /var/lib/wtmpdb/wtmp\&.db\&. .RE .SH "MODULE TYPES PROVIDED" .PP The \fBsession\fR module type is provided for updating the wtmp database with the login and logout information about an user\&. .SH "RETURN VALUES" .PP .PP PAM_SUCCESS .RS 4 Everything was successful\&. .RE .PP PAM_SERVICE_ERR .RS 4 Internal service module error\&. This includes error reading from or writing to the database\&. .RE .PP PAM_USER_UNKNOWN .RS 4 User not known\&. .RE .PP PAM_IGNORE .RS 4 Returned by service types which do nothing\&. .RE .SH "EXAMPLES" .PP Add the following line to e\&.g\&. /etc/pam\&.d/login to display the last login time of a user: .sp .if n \{\ .RS 4 .\} .nf session required pam_wtmpdb\&.so .fi .if n \{\ .RE .\} .SH "FILES" .PP /var/lib/wtmpdb/wtmp\&.db .RS 4 Wtmpdb logging database file .RE .SH "SEE ALSO" .PP \fBwtmpdb\fR(8), \fBpam.conf\fR(5), \fBpam.d\fR(5), \fBpam\fR(8) .SH "AUTHOR" .PP pam_wtmpdb was written by Thorsten Kukuk \&.