logwtmp(3) -- Linux man page
NAMEupdwtmp, logwtmp - append an entry to the wtmp file
#include <utmp.h> void updwtmp(const char *wtmp_file, const struct utmp *ut);
void logwtmp(const char *line, const char *name, const char *host);
DESCRIPTIONupdwtmp() appends the utmp structure ut to the wtmp file.
AVAILABILITYBoth functions are available under glibc2, but not under libc5. However, logwtmp used to occur in the old libbsd. These days, the logwtmp function is included in libutil. (Hence you'll need to add -lutil to your compiler commandline to get it.)
- database of past user logins