Crate lastlog

source ·
Expand description

Simple crate for retrieving latest last-login records on a UNIX system

The basic usage looks like:

use lastlog::{search_uid, search_username};

fn main() {
   let result1 = search_uid(1000);
   let result2 = search_username("foo");
}

NOTE: this functionality is only designed to work with UNIX systems that support either utmp/wtmp or lastlog database types.

Structs

Lastlog Database Reader Implementation
Single Database Record instance for a given user’s latest-login information
UTMP/WTMP Database Reader Implementation

Enums

Simple Enum for declaring last login-time

Traits

Public Trait for specific linux database search implementations

Functions

Use an auto-selected module to iterate logins for every user account
Use an auto-selected module to find the last login for a specified user-id
Use an auto-selected module to find the last login for a specified username