Go bindings to maintain the traditional UNIX utmp/utmpx and lastlog, used for tracking remote terminal sessions.
Go to file
Russtopia a850a7ed13 Added README.md 2018-06-27 15:24:11 -07:00
main Renamed pkg to goutmp 2018-06-27 14:57:26 -07:00
README.md Added README.md 2018-06-27 15:24:11 -07:00
goutmp.go Added godocs 2018-06-27 15:18:28 -07:00

README.md

goutmp - Minimal bindings to C stdlib pututmpx(), getutmpx() (/var/log/wtmp) and /var/log/lastlog

Any Go program which allows user shell access should update the standard UNIX files which track user sessions: /var/log/wtmp (for the 'w' and 'who' commands), and /var/log/lastlog (the 'last' and 'lastlog' commands).

go doc package goutmp // import "blitter.com/go/goutmp"

Golang bindings for basic login/utmp accounting

func Put_lastlog_entry(app string, usr string, host string) func Unput_utmp(entry UtmpEntry) type UtmpEntry struct{ ... } func Put_utmp(user string, host string) UtmpEntry