Linux Pam

LogZilla App Store application: Linux Pam

Pluggable Authentication Modules (PAM)

Linux Pluggable Authentication Modules (PAM) is a suite of libraries that allows a Linux system administrator to configure methods to authenticate users. It provides a flexible and centralized way to switch authentication methods for secured applications by using configuration files instead of changing application code. There are Linux PAM libraries allowing authentication using methods such as local passwords, LDAP, or fingerprint readers. Linux PAM is evolved from the Unix Pluggable Authentication Modules architecture.

These PAM log messages are logged by the linux kernel to /var/log/auth.log and must be read from there. Syslog-ng or similar should be configured to read log messages from this file and forward those messages to the LogZilla server.

Rule Function

The purpose of this rule is to set various user tags for the fields in the PAM log messages.

Vendor Documentation

Log Source Details

ItemValue
Vendorany linux distribution
Device Typelinux OS
Supported Software Version(s)any distribution with PAM and syslog-ng
Collection MethodSyslog
Configurable Log Output?no
Log Source Typelinux syslog
ExceptionsN/A

Currently Supported Log Types

The log format is a standard linux kernel syslog log message. There are no key-value pairs and minimal space-separated values. The log message should be in the following format:

text
pam_unix(<process name>:<context>): <authentication message>

The <authentication message> should be in one of the following two formats:

text
session <action> for user <user>
text
authentication failure; logname= uid=0
euid=0 tty=<tty> ruser= rhost=<src host>  user=<user>

Parsed Metadata Fields

The PAM log messages do not have key-value pairs and fixed fields are minimal. The data values parsed from the PAM message are:

TaggedFieldTag NameExampleDescription
<process name>sudoprocess name initiating the PAM request
<action>PAM Actionopenedsession opened or closed
<user>PAM User Trackingrootuser account being authenticated
<tty>PAM ttysshterminal originating PAM request
<rhost>PAM Remote Host11.22.33.44host originating PAM request
<ruser>PAM Remote Uservmuseruser originating PAM request

High-Cardinality (HC) Tags

  • PAM Remote Host

Log Examples

text
Feb  3 19:08:47 ubuntu-server-vm login[708]: pam_unix(login:session): session opened for user vmuser by LOGIN(uid=0)
Feb  3 19:08:47 ubuntu-server-vm systemd[1019]: pam_unix(systemd-user:session): session opened for user vmuser by (uid=0)
Feb  3 19:14:06 ubuntu-server-vm sudo[2302]: pam_unix(sudo:session): session opened for user root by vmuser(uid=0)
Feb  3 19:14:10 ubuntu-server-vm sudo[2302]: pam_unix(sudo:session): session closed for user root
Feb  3 20:09:30 ubuntu-server-vm sshd[4310]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.250.2  user=vmuser
Feb  3 20:13:31 ubuntu-server-vm sshd[4338]: pam_unix(sshd:session): session opened for user vmuser by (uid=0)
Linux Pam | LogZilla Documentation