#openbsd #unix #utmp #login #unix-file #system #file-format

utmp-classic

Parsing login records in classic UNIXv1 type UTMP files; still used in OpenBSD

7 releases

0.1.6 May 18, 2024
0.1.5 May 16, 2024

#215 in Unix APIs

Download history 2642/week @ 2024-08-10 2045/week @ 2024-08-17 835/week @ 2024-08-24 1729/week @ 2024-08-31 2702/week @ 2024-09-07 5233/week @ 2024-09-14 2904/week @ 2024-09-21 1877/week @ 2024-09-28 2493/week @ 2024-10-05 2009/week @ 2024-10-12 3922/week @ 2024-10-19 1820/week @ 2024-10-26 1179/week @ 2024-11-02 1474/week @ 2024-11-09 3899/week @ 2024-11-16 2983/week @ 2024-11-23

9,820 downloads per month
Used in 3 crates (2 directly)

MIT license

20KB
328 lines

utmp-classic

Rust library for reading utmp files. Please note that all Unix like systems (Including all GNU/Linuxes, MacOS and all BSDs except OpenBSD) use the newer utmpx file format, even if they still call it utmp. This library works only for original Unix utmp files which is only used in OpenBSD as far as I know.

If you are looking for a lib to be used on anything other than OpenBSD; you might be looking for a utmpx library, although most of them calls themselves utmp; not sure why :D

sample run

A sample utmp file is included in the root directory, you can run a sample by issuing:

cargo run --package utmp-classic --example dump-utmp utmp 

history

This library is based on utmp-rs library by upsuper; changed to work on the classic AT&T Unix v1 style utmp files still used by OpenBSD.

rust crate

Dependencies

~1.5–2.3MB
~40K SLoC