updwtmp

NAME

updwtmp, logwtmp - append an entry to the wtmp file

SYNOPSIS

#include <utmp.h>
 I void updwtmp(const char * wtmp_file , const struct utmp * ut );

I void logwtmp(const char * line , const char * name , const char * host );

DESCRIPTION

R updwtmp () appends the utmp structure ut to the wtmp file.
R logwtmp () constructs a utmp structure using R line , name , host , current time and current process ID. Then it calls R updwtmp () to append the structure to the utmp file.

FILES

/var/log/wtmp
database of past user logins

CONFORMING TO

Not in POSIX.1-2001. Present on Solaris, NetBSD, and perhaps other systems.

AVAILABILITY

Both functions are available under glibc2, but not under libc5. However, R logwtmp () used to occur in the old libbsd. These days, the R logwtmp () function is included in libutil. (Hence you'll need to add -lutil to your compiler command line to get it.)

SEE ALSO

wtmp(5)