1UPDWTMP(3) Linux Programmer's Manual UPDWTMP(3)
2
3
4
6 updwtmp, logwtmp - append an entry to the wtmp file
7
9 #include <utmp.h>
10
11 void updwtmp(const char *wtmp_file, const struct utmp *ut);
12 void logwtmp(const char *line, const char *name, const char *host);
13
15 updwtmp() appends the utmp structure ut to the wtmp file.
16
17 logwtmp() constructs a utmp structure using line, name, host, current
18 time and current process ID. Then it calls updwtmp() to append the
19 structure to the utmp file.
20
22 Both functions are available under glibc2, but not under libc5. How‐
23 ever, logwtmp() used to occur in the old libbsd. These days, the
24 logwtmp() function is included in libutil. (Hence you'll need to add
25 -lutil to your compiler command line to get it.)
26
28 Not in POSIX.1-2001. Present on Solaris, NetBSD, and perhaps other
29 systems.
30
32 /var/log/wtmp
33 database of past user logins
34
36 wtmp(5)
37
38
39
40GNU 2003-07-18 UPDWTMP(3)