pyfingerd.posix – POSIX compliant interfaces#

This module can only load on POSIX compliant environments. Importing it from other environments will result in an ImportError.

class pyfingerd.posix.FingerPOSIXInterface#

Bases: pyfingerd.core.FingerInterface

Finger interface for POSIX-compliant systems.

The method for gathering users and sessions on such systems is the following:

  1. Get the users in /etc/passwd, and check which ones not to make appear through the presence of .nofinger in their home directory.

  2. Get the last login times for all users to display them by default, through the lastlog database if available.

  3. Get the sessions in the utmp / utmpx database, and make them correspond to the related user.

  4. For each session, get the idle time by gathering the mtime of the device.