1 .\" Copyright 1997 Nicolás Lichtmaier <nick@debian.org>
2 .\" Created Wed Jul 2 23:27:34 ART 1997
4 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 .\" GNU General Public License for more details.
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, see
22 .\" <http://www.gnu.org/licenses/>.
25 .\" Added info on availability, aeb, 971207
26 .\" Added -lutil remark, 030718
27 .\" 2008-07-02, mtk, document updwtmpx()
29 .TH UPDWTMP 3 2021-03-22 "GNU" "Linux Programmer's Manual"
31 updwtmp, logwtmp \- append an entry to the wtmp file
36 .BI "void updwtmp(const char *" wtmp_file ", const struct utmp *" ut );
37 .BI "void logwtmp(const char *" line ", const char *" name \
38 ", const char *" host );
43 link with \fI\-lutil\fP.
46 appends the utmp structure
51 constructs a utmp structure using
52 .IR line ", " name ", " host ,
53 current time, and current process ID.
56 to append the structure to the wtmp file.
60 database of past user logins
62 For an explanation of the terms used in this section, see
70 Interface Attribute Value
74 T} Thread safety MT-Unsafe sig:ALRM timer
81 Present on Solaris, NetBSD, and perhaps other systems.
83 For consistency with the other "utmpx" functions (see
85 glibc provides (since version 2.1):
90 .BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx );
94 This function performs the same task as
96 but differs in that it takes a
98 structure as its last argument.