---
name: "pam_lastlog"
section: "8"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/pam_lastlog"
---

# pam\_lastlog(8)

login accounting PAM module

## NAME

**pam\_lastlog** – login accounting PAM module

## SYNOPSIS

\[*service-name*\] *module-type* *control-flag* *pam\_lastlog* \[*options*\]

## DESCRIPTION

The login accounting service module for PAM, **pam\_lastlog** provides functionality for only one PAM category: session management. In terms of the *module-type* parameter, this is the “session” feature.

### Login Accounting Session Management Module

The login accounting session management component provides functions to initiate (**pam\_sm\_open\_session**()) and terminate (**pam\_sm\_close\_session**()) sessions. The **pam\_sm\_open\_session**() function records the session in the user accounting database. The **pam\_sm\_close\_session**() function does nothing.

The following options may be passed to the authentication module:

- **debug**

  [syslog(3)](/syslog/3.md) debugging information at LOG\_DEBUG level.

- **no\_warn**

  suppress warning messages to the user.

- **no\_fail**

  Ignore I/O failures.

## SEE ALSO

[last(1)](/last/1.md), [w(1)](/w/1.md), [getutxent(3)](/getutxent/3.md), [pam(3)](/pam/3.md), [ulog\_login(3)](/ulog_login/3.md), [ulog\_logout(3)](/ulog_logout/3.md), [pam.conf(5)](/pam.conf/5.md), [lastlogin(8)](/lastlogin/8.md)

## AUTHORS

The **pam\_lastlog** module and this manual page were developed for the FreeBSD Project by ThinkSec AS and NAI Labs, the Security Research Division of Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 (“CBOSS”), as part of the DARPA CHATS research program.
