updwtmp(3)


NAME

   updwtmp, logwtmp - append an entry to the wtmp file

SYNOPSIS

   #include <utmp.h>

   void updwtmp(const char *wtmp_file, const struct utmp *ut);
   void logwtmp(const char *line, const char *name, const char *host);

   For logwtmp(), link with -lutil.

DESCRIPTION

   updwtmp() appends the utmp structure ut to the wtmp file.

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

FILES

   /var/log/wtmp
          database of past user logins

ATTRIBUTES

   For   an   explanation   of   the  terms  used  in  this  section,  see
   attributes(7).

   ┌───────────┬───────────────┬──────────────────────────┐
   │InterfaceAttributeValue                    │
   ├───────────┼───────────────┼──────────────────────────┤
   │updwtmp(), │ Thread safety │ MT-Unsafe sig:ALRM timer │
   │logwtmp()  │               │                          │
   └───────────┴───────────────┴──────────────────────────┘

CONFORMING TO

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

NOTES

   For consistency with the other "utmpx"  functions  (see  getutxent(3)),
   glibc provides (since version 2.1):

   #include <utmpx.h>

   void updwtmpx (const char *wtmpx_file, const struct utmpx *utx);

   This  function performs the same task as updwtmp(), but differs in that
   it takes a utmpx structure as its last argument.

SEE ALSO

   getutxent(3), wtmp(5)

COLOPHON

   This page is part of release 4.09 of the Linux  man-pages  project.   A
   description  of  the project, information about reporting bugs, and the
   latest    version    of    this    page,    can     be     found     at
   https://www.kernel.org/doc/man-pages/.


More Linux Commands

manpages/smidiff.1.html
smidiff(1) - check differences between a pair of SMI or SPPI
The smidiff program is used to check differences between a pair of SMI MIB modules or SPPI PIB modules. E.g., it can be used to detect changes in updated MIB mo

manpages/endian.3.html
endian(3) - convert values between host and big-/little-endi
These functions convert the byte encoding of integer values from the byte order that the current CPU (the host) uses, to and from little-endian and big-endian b

manpages/gencat.1.html
gencat(1) Generate message catalog - Linux manual page......
The gencat program is specified in the X/Open standard and the GNU implementation follows this specification and so processes all correctly formed input files.

manpages/sane-sp15c.5.html
sane-sp15c(5) - SANE backend for Fujitsu ScanPartner 15C fla
The sane-sp15c library implements a SANE (Scanner Access Now Easy) backend which provides access to the Fujitsu flatbed scanners. At present, the following scan

manpages/XtNew.3.html
XtNew(3) - memory management functions - Linux manual page
The XtMalloc functions returns a pointer to a block of storage of at least the specified size bytes. If there is insufficient memory to allocate the new block,

manpages/labelframe.n.html
labelframe(n) - Create and manipulate labelframe widgets....
The labelframe command creates a new window (given by the pathName argument) and makes it into a labelframe widget. Additional options, described above, may be

manpages/innmail.1.html
innmail(1) - Simple mail-sending program - Linux man page...
innmail is a Perl script intended to provide the non-interactive mail-sending functionality of mail(1) while avoiding nasty security problems. It takes the body

manpages/jpgicc.1.html
jpgicc(1) little cms ICC profile applier for JPEG...........
jpgicc.1 - lcms is a standalone CMM engine, which deals with the color management. It implements a fast transformation between ICC profiles. jpegicc is little c

manpages/lmtpd.8.html
lmtpd(8) - LMTP server process (Admin - Linux man page).....
Lmtpd is an LMTP server used to deliver mail to the IMAP mailstore. It accepts commands on its standard input and responds on its standard output. It MUST be in

manpages/namespace.conf.5.html
namespace.conf(5) - the namespace configuration file........
The pam_namespace.so module allows setup of private namespaces with polyinstantiated directories. Directories can be polyinstantiated based on user name or, in

manpages/XpSelectInput.3x.html
XpSelectInput(3x) - Specifies which X Print events, from the
XpSelectInput selects which X Print events from the specified print context the client is interest in. The X Print Events are generated from a current print con

manpages/field_type.3form.html
field_type(3form) - data type validation for fields.........
The function set_field_type declares a data type for a given form field. This is the type checked by validation functions. The predefined types are as follows:





We can't live, work or learn in freedom unless the software we use is free.