1UPDWTMP(3)                 Linux Programmer's Manual                UPDWTMP(3)
2
3
4

NAME

6       updwtmp, logwtmp - append an entry to the wtmp file
7

SYNOPSIS

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
14       For logwtmp(), link with -lutil.
15

DESCRIPTION

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

FILES

24       /var/log/wtmp
25              database of past user logins
26

ATTRIBUTES

28       For   an   explanation   of   the  terms  used  in  this  section,  see
29       attributes(7).
30
31       ┌───────────┬───────────────┬──────────────────────────┐
32Interface  Attribute     Value                    
33       ├───────────┼───────────────┼──────────────────────────┤
34updwtmp(), │ Thread safety │ MT-Unsafe sig:ALRM timer │
35logwtmp()  │               │                          │
36       └───────────┴───────────────┴──────────────────────────┘
37

CONFORMING TO

39       Not in POSIX.1.  Present on Solaris, NetBSD, and perhaps other systems.
40

NOTES

42       For consistency with the other "utmpx"  functions  (see  getutxent(3)),
43       glibc provides (since version 2.1):
44
45           #include <utmpx.h>
46           void updwtmpx (const char *wtmpx_file, const struct utmpx *utx);
47
48       This  function performs the same task as updwtmp(), but differs in that
49       it takes a utmpx structure as its last argument.
50

SEE ALSO

52       getutxent(3), wtmp(5)
53

COLOPHON

55       This page is part of release 4.15 of the Linux  man-pages  project.   A
56       description  of  the project, information about reporting bugs, and the
57       latest    version    of    this    page,    can     be     found     at
58       https://www.kernel.org/doc/man-pages/.
59
60
61
62GNU                               2017-09-15                        UPDWTMP(3)
Impressum