Fact-checked by Grok 2 weeks ago

utmp

The utmp file is a binary log file used in operating systems to record real-time information about currently active user sessions on the system, including details such as usernames, devices, IDs, and timestamps. It serves as a central source for commands like who and w to display information about logged-in users, enabling system administrators to monitor active logins and sessions. Originating in AT&T UNIX, the utmp format has become a across various Unix variants, including and BSD systems, though its exact implementation can vary between them. The utmp file, typically located at /var/run/utmp, consists of a sequence of fixed-size records defined by the struct utmp in the <utmp.h> header file. The records include fields for user identification, terminal, process details, host, and timestamps, though the exact fields and sizes vary by system implementation (see File Formats section for details). Programs such as login, init, and getty maintain these entries: a record is added upon login and updated or removed upon logout to reflect the system's current state. For security, the file should not be writable by non-root users to prevent unauthorized modifications. Related files extend utmp's functionality for historical and security logging. The wtmp file, usually at /var/log/wtmp, archives all login and logout events in a similar format, allowing tools like last to review past sessions, including system reboots and shutdowns (displayed by tools like last with special entries such as "reboot"). In some systems, such as Linux, the btmp file at /var/log/btmp records failed login attempts for auditing purposes, aiding in the detection of brute-force attacks or unauthorized access attempts. These files are managed by system daemons and utilities, with rotation recommended for wtmp and btmp (where applicable) due to their potential for rapid growth. The lastlog file complements them by storing the most recent login details per user, such as the last login time and originating host.

Introduction

Purpose and Functionality

The utmp file serves as a binary log on operating systems, recording information about current user logins, logouts, and key system events such as boots and shutdowns. It provides a mechanism to track active sessions and system state changes in , enabling administrators and utilities to monitor who is using the system at any given moment. Although not all programs update this file, it captures essential details for processes that do, ensuring a snapshot of ongoing activity. utmp supports various system commands by supplying data on active users, such as through the who utility, which queries the file to display currently logged-in users along with their terminals and login times. For session history, utmp works in conjunction with related files that archive past entries, allowing reconstruction of login patterns over time. This functionality is crucial for tasks like resource allocation, security auditing, and performance analysis in multi-user environments. The file maintains specific record types to categorize entries, including user processes for normal login sessions, the init process for system initialization, run levels for state transitions, boot time for startup events, and clock changes for time adjustments. These records are populated dynamically as events occur. utmp is updated in real time by login daemons, such as getty for console access or sshd for remote sessions, with each entry typically including fields like the username, terminal device, remote host, ID, , and to provide context for the activity.

Historical Development

The utmp file originated in the early of the , serving as a key component for user accounting and system monitoring. It first appeared in of UNIX in 1971, initially located at /tmp/utmp, to track current user sessions and support commands like who for displaying logged-in users. By the release of in 1979, utmp had become integral to accounting tools, enabling real-time monitoring of active processes and terminals across multi-user environments. This early implementation laid the foundation for login session management in operating systems. In the , the ecosystem expanded with the introduction of wtmp and btmp files to provide persistent beyond the volatile utmp. The wtmp file, which records historical and logout events, traces back to Version 2 UNIX in 1972 but gained widespread adoption in System V releases during the decade for auditing purposes. Complementing this, btmp emerged to log failed attempts, enhancing monitoring by capturing unsuccessful events, often integrated into login daemons like those in (BSD) variants. These additions addressed the limitations of transient session data, allowing administrators to review past activity for accounting and troubleshooting. The 1990s saw further evolution with the development of utmpx by , introduced as a 32-bit extension in 2.0 (released in 1992) to accommodate larger systems and extended fields for modern hardware. This variant, along with wtmpx and btmpx, supported longer usernames, addresses, and timestamps, making it suitable for growing network environments and 64-bit architectures. Sun's implementation influenced other vendors, providing a more robust alternative to the original formats for high-volume user tracking. Standardization efforts culminated in POSIX.1-2001, which formalized utmpx and wtmpx as part of the XSI extension in the Version 3, while noting that the original utmp and wtmp were non-standard but prevalent. This inclusion promoted portability across BSD and variants by defining a common structure and API, such as getutxent(). Early implementations varied significantly by vendor—System V used different field conventions from BSD, leading to compatibility challenges in applications relying on utmp parsing—issues largely mitigated by the baseline.

File Formats

Original utmp, wtmp, and btmp

The original utmp file format consists of a sequence of fixed-size binary records, each representing a login session or system event, as defined by the struct utmp in the <utmp.h> header file. On many Unix-like systems, including Linux, each record is 384 bytes long, including padding for alignment and compatibility across 32-bit and 64-bit architectures. The core fields include ut_type (a short integer enum indicating the record type, such as EMPTY for unused slots, USER_PROCESS for active logins, DEAD_PROCESS for logouts, BOOT_TIME for system boots, RUN_LVL for run-level changes, and others up to ACCOUNTING), ut_pid (process ID of the login shell as a pid_t), ut_line (a 32-byte array for the terminal device name, such as "tty1"), ut_id (a 4-byte array for a unique session identifier), ut_user (a 32-byte array for the username), ut_host (a 256-byte array for the remote hostname or kernel version string), ut_exit (a structure with two short integers for termination and exit status), ut_session (a long integer for the session ID), ut_tv (a structure holding the timestamp as seconds and microseconds since the epoch), and ut_addr_v6 (an array of four 32-bit integers for the remote host's IPv4 or IPv6 address). String fields are null-terminated if shorter than their allocated size, ensuring consistent record length. The wtmp file uses the identical binary record format but serves as an append-only log for historical login and logout events, with new records added sequentially without overwriting. Logouts are indicated by a DEAD_PROCESS record with an empty ut_user field, while active sessions mirror utmp entries. Similarly, the btmp file employs the same utmp structure to record failed login attempts, capturing details such as the terminal (ut_line), (ut_tv), remote (ut_host), and ID (ut_pid), with ut_type set to LOGIN_PROCESS and ut_user set to the attempted username. Special entries in these files mark system events beyond user logins: for instance, boot records use BOOT_TIME with ut_line set to "" and ut_user to ""; shutdown or uses DEAD_PROCESS with ut_line as "" and ut_user as "shutdown" or ""; run-level changes employ RUN_LVL with ut_line as "run-level" and ut_user holding the previous and current run-level digits (e.g., "23" for transition from level 2 to 3). These conventions allow utilities to parse system state changes reliably. The format exhibits system-specific variations, such as the exact field sizes and padding in Linux's 384-byte records, rendering it non-portable across different architectures or even between 32-bit and 64-bit variants without compatibility layers. Over time, this legacy format has evolved into extended variants like utmpx to support larger usernames and addresses on modern systems.

Extended utmpx, wtmpx, and btmpx

The extended formats, utmpx, wtmpx, and btmpx, represent POSIX-compliant evolutions of the original utmp, wtmp, and btmp, designed to support modern system requirements including enhanced precision and compatibility. Defined in the <utmpx.h> header, the utmpx structure typically spans 384 bytes (or more in certain implementations) and includes expanded fields such as ut_exit—a structure capturing process termination and exit status—ut_session for session identification, and ut_tv as a struct timeval providing timestamps with resolution. This structure complies with POSIX.1-2001 by replacing the legacy ut_time field with ut_tv for improved temporal accuracy and incorporating ut_syslen to specify the effective length of the ut_host field (often truncated to accommodate longer names). The wtmpx and btmpx files parallel wtmp and btmp in purpose—recording login history and failed attempts, respectively—but employ the extended utmpx records for richer data capture, and are the preferred variants on platforms like and contemporary systems. Originating from to facilitate 64-bit compatibility amid growing address spaces and data sizes, the utmpx format was standardized in POSIX.1-2001; Linux's library accommodates both original and extended variants, prioritizing utmpx when _GNU_SOURCE is enabled for full feature access. Notably, the extended format better handles expanded hostnames and addressing via dedicated fields like ut_host and ut_addr_v6 (a 16-byte array), addressing limitations in legacy networking support.

System Integration

Default Locations and Paths

In operating systems, the default locations for utmp and related files vary by implementation, reflecting historical conventions and system-specific standards. The (FHS) specifies paths for Linux distributions to ensure consistency. These files typically reside in volatile directories like /var/run for current sessions and /var/log for persistent records. The following table summarizes the standard paths across major systems:
Operating SystemCurrent SessionsHistorical LoginsFailed LoginsExtended Variants
/var/run/utmp/var/log/wtmp/var/log/btmp/var/run/utmpx (current), /var/log/wtmpx (history)
/var/adm/utmpx/var/adm/wtmpxN/AUses extended format (utmpx/wtmpx); legacy /var/adm/utmp deprecated
/var/run/utx.active/var/log/utx.logN/A (failed logins in /var/log/auth.log)N/A
macOS/var/run/utmpxDeprecated (uses unified logging)N/AN/A (btmp not standard)
Variations arise from efforts to support larger timestamps and additional fields in extended formats, while maintaining with tools. Access to these files generally requires appropriate permissions, such as privileges for writing.

Access Mechanisms and Permissions

Processes interact with utmp files primarily through the C library functions defined in <utmpx.h>. The getutxent() function reads the next entry sequentially from the utmpx file, returning a pointer to a struct utmpx or NULL on end-of-file or error, while getutxid() and getutxline() search for specific entries matching identifiers or line names, respectively. For writing, pututxline() locks the file, updates or appends the provided struct utmpx entry, and returns a pointer to the written structure or NULL on failure. Access is closed using endutxent(), which flushes any buffered data and closes the . utmp files, such as /var/run/utmp, typically have permissions of 644 (rw-r--r--), owned by and the utmp group, ensuring readability by all users but writability restricted to the owner and group to prevent unauthorized modifications. This setup allows system programs like to write entries via setgid mechanisms, while ordinary users cannot alter the file, mitigating risks of faked logins. The man page for utmp explicitly warns that the file must not be writable by the "other" class, as many programs rely on its integrity for accurate user accounting. Integration with modern init systems and authentication frameworks ensures controlled updates to utmp. In systemd-based distributions, the systemd-update-utmp.service automatically records system boot and shutdown events into utmp and wtmp, running as part of the boot process. Additionally, systemd services can use the UtmpIdentifier= directive in unit files to generate specific utmp/wtmp entries for user sessions, with modes like "user" creating USER_PROCESS records for session leaders. The Pluggable Authentication Modules (PAM) framework, through modules invoked during login sessions, coordinates with these library functions to update utmp records for user logins and logouts, maintaining consistency across authentication flows. On Linux systems, /var/run/utmp is often a symlink to /run/utmp, where /run is mounted as a tmpfs filesystem in memory for performance, avoiding disk I/O for current login data that is volatile across reboots. Non-root processes require the CAP_SYS_ADMIN capability to write to this file, as it is owned by root; login-related binaries typically run with elevated privileges to perform updates. For historical logs like wtmp, entries are appended sequentially rather than overwritten, preserving a complete record of past logins, logouts, and system events for auditing. Rotation is handled by tools like logrotate, which compress and archive the growing file when it exceeds configured thresholds, such as monthly or size-based limits, to manage disk space without losing history.

Utilities and Commands

Viewing Current and Historical Logins

The primary utilities for viewing utmp and related log data in systems are the , last, and lastb commands, which provide insights into current sessions, historical logins, and failed authentication attempts, respectively. However, as of late 2025, some distributions such as 25.10 and 13 are deprecating the last and lastb commands in favor of alternatives like systemd-logind. These tools read from the utmp (or utmpx) file for active users and the wtmp (or wtmpx) and btmp (or btmpx) files for historical records, displaying formatted output that includes usernames, terminals, remote hosts (often as addresses), timestamps, and session durations. On systems, these commands are implemented as part of the package, while BSD variants like , , and offer equivalent functionality through their base system utilities that similarly parse utmp-derived files. The who command displays information about users currently logged into the system by examining the utmp file, typically located at /var/run/utmp. It outputs key details such as the username, associated (e.g., tty1 or pts/0), remote host or from which the originated, and the time in a human-readable format like Nov 14 10:30. For example, running who might produce lines like user pts/0 192.168.1.100 Nov 14 10:30, allowing administrators to monitor active sessions in . The -u option extends this by adding idle time, showing how long a has been inactive (e.g., (1:23) for 1 minute and 23 seconds), which helps identify potentially stalled connections; the -a option includes details on all processes associated with terminals, such as dead processes or processes from defunct ttys. For historical login data, the last command parses the wtmp file, usually at /var/log/wtmp, to list past login and logout events in reverse chronological order, from most recent to oldest. Each entry includes the username, terminal, remote host, login and logout times, and session duration (e.g., 1:23 or already logged out), along with system events like reboots marked as reboot system boot. This enables tracking of user activity over time, such as total uptime or frequent access patterns; for instance, last root filters to show only root's sessions. The -F option provides full timestamps (e.g., Thu Nov 14 10:30:45 2025), while -n number limits output to the specified number of recent entries to avoid overwhelming logs from large wtmp files. On BSD systems, last functions similarly, reading wtmp and supporting options like -f to specify alternate files. The lastb command, specific to implementations, reads the btmp file at /var/log/btmp to display records of failed attempts, helping with audits by revealing patterns in brute-force attacks or issues. Output mirrors last but focuses on unsuccessful events, showing the attempted username, or source , and (e.g., user1 pts/0 192.168.1.100 Thu Nov 14 10:30 bad [login](/page/Login)), without logout details since failures do not establish sessions. It requires privileges due to the sensitive nature of failure logs and supports options like -n for limiting entries or -F for detailed times; on BSD systems, failed attempts are typically logged to text files such as /var/log/auth.log, where they can be searched using commands like for patterns such as "Failed password". These tools collectively offer a read-only to utmp-derived data, with output formats standardized across implementations to include idle times where applicable and remote sources for networked logins.

Managing and Maintaining Log Files

Managing utmp-related log files, such as wtmp and btmp, requires regular maintenance to prevent excessive growth and ensure system performance. On , the logrotate utility is commonly used to automate the rotation of these files, configuring schedules like weekly rotations or size-based triggers (e.g., when exceeding 1 MB) to create compressed archives and limit the number of retained versions. On BSD systems, newsyslog(8) serves a similar purpose for log rotation. This prevents unbounded file expansion, as wtmp records all and logout events, potentially reaching gigabytes in high-activity environments and consuming significant disk space or straining resources if unrotated. For inspecting the binary structure of utmp, wtmp, or btmp files, utmpdump from the package provides a hexadecimal dump in human-readable ASCII format, allowing administrators to examine or debug corrupted records without specialized tools. It reads from standard input or a specified file and supports options like following file growth or writing back edited entries, making it suitable for low-level maintenance tasks. Manual management techniques include using the tac command to reverse the order of records in wtmp or btmp files, which are appended in chronological order (newest at the end), enabling chronological viewing when piped to other tools for processing. For security purposes, such as after investigating failed attempts, administrators can safely clear btmp by truncating it with > /var/log/btmp or cat /dev/null > /var/log/btmp, which empties the file without deleting it and avoids disrupting processes expecting its presence. Similarly, wtmp can be cleared using cat /dev/null > /var/log/wtmp to reset history. Integration with cron jobs facilitates automated archival, such as monthly tasks in /etc/cron.monthly to compress and relocate old wtmp files to secure storage, ensuring long-term retention without ongoing performance impacts. An example logrotate configuration snippet for /var/log/wtmp, often placed in /etc/logrotate.d/, might appear as:
/var/log/wtmp {
    rotate 5
    weekly
    compress
    create 0664 root utmp
}
This rotates the file weekly, retains five archives, compresses older versions, and recreates the file with appropriate ownership upon rotation. Verification of rotations can be performed using viewing commands like last to confirm updated log contents post-maintenance.

Security and Auditing

Potential Vulnerabilities

The utmp file, typically located at /var/run/utmp, has default permissions such as 644 or 664 (world-readable), allowing any local user to access its contents and view current user sessions, including sensitive details like hostnames from remote logins stored in the ut_host field. This exposure can reveal or internal system information to unauthorized local users, increasing risks in multi-user environments where attackers might leverage session data for further . Similarly, the wtmp and btmp files, which record historical logins and failed attempts, often have comparable readability, enabling potential leakage of login patterns without encryption, as all data—including hostnames or addresses—is stored in plain format. A significant denial-of-service (DoS) risk arises from log flooding, particularly targeting btmp, where brute-force attacks generate excessive failed login entries that can rapidly consume disk space on the /var partition. For instance, automated password guessing attempts against SSH services can fill btmp to gigabytes in size, potentially rendering the system unresponsive by exhausting storage and disrupting normal logging operations. Without regular rotation or size limits configured via tools like logrotate, this can lead to broader system instability, as observed in cases where public-facing servers experience sustained attack traffic. Historical exploits have highlighted tampering vulnerabilities in utmp-related utilities. In , a symlink attack in the utempter utility (used to update utmp and wtmp entries) allowed local unprivileged users to overwrite arbitrary files by exploiting improper handling, potentially enabling or data corruption when combined with applications trusting these logs. Earlier, pre-2000s implementations faced risks from inadequate file integrity checks, where improper permissions could permit modification of utmp entries, leading to faked login records that mislead auditing tools. More recently, a 2023 glibc issue in utmp/wtmp locking permitted non-privileged users to acquire exclusive locks on these files, causing by blocking access for legitimate processes. The lack of encryption in utmp, wtmp, and btmp files means remote login details, including originating IP addresses or hostnames, are directly accessible upon reading the binary records, potentially exposing attacker reconnaissance patterns in btmp if files are not promptly rotated. While the extended utmpx format addresses some legacy limitations—such as larger field sizes for IPv6 support and additional metadata like session IDs—core risks like readability and tampering persist, though it mitigates certain race conditions in multi-threaded environments.

Best Practices for Monitoring

To ensure the integrity and usability of utmp, wtmp, and btmp files for security monitoring, regular rotation and archiving are essential to prevent disk space exhaustion and maintain performance. The logrotate utility is commonly configured to handle these binary files, typically rotating wtmp and btmp monthly or when they exceed a specified size threshold, such as 1 MB, while compressing older archives with to save space. Administrators can implement custom scripts, often run via jobs, to monitor file sizes in real-time and alert on excessive growth, enabling proactive management of log volume. Restricting to these files is a fundamental measure to mitigate unauthorized tampering or . The recommended permissions for utmp and wtmp are 644 (or 664 with utmp group), owned by (and utmp group), to allow world-readable for tools like 'who' and '' while preventing writes by non- users, as specified in man utmp(5). For wtmp on systems where user to full historical logs is unnecessary, 640 may be used to limit readability to and group, but utmp should retain world-read to avoid breaking standard utilities. On critical systems, applying the immutable attribute with +i further protects against accidental or malicious modifications, even by , until explicitly unset with -i. For enhanced visibility in enterprise environments, integrating utmp-derived data with (SIEM) tools facilitates centralized analysis. Output from the last command, which parses wtmp for , can be piped to via scripted tasks, forwarding events to a remote SIEM for with other logs. Effective auditing relies on enabling and reviewing btmp to track failed attempts, providing early indicators of brute-force attacks or abuse. The btmp file should be activated through , such as in /etc/.d, and examined daily using the lastb command to identify anomalies like repeated failures from specific IPs. Compliance with standards like PCI DSS, which mandates audit trails for all individual user access to system components under Requirement 10, can be supported by utmp family files for basic login tracking; however, for comprehensive event capture including deeper authentication details, these should be paired with tools like auditd.

Modern Context

Deprecations in Contemporary Systems

In contemporary systems, the legacy utmp format and its associated interfaces have been progressively deprecated in favor of extended variants like utmpx to address limitations such as 32-bit time fields vulnerable to the and security risks from unprivileged access. On , the GNU C Library () treats utmp.h as an alias for utmpx.h since early 2000s, but both interfaces are now deprecated due to their 32-bit time_t fields that overflow in 2038, with glibc developers recommending migration away from them entirely. In distributions like 10, which uses glibc 2.39, these interfaces are explicitly marked for removal in future releases. Additionally, systemd-based systems employ journald for persistent logging of user sessions and system events, reducing reliance on utmp for certain auditing tasks. FreeBSD shifted away from the traditional utmp file starting with version 9.0 in , replacing it with utx.active (equivalent to utmp) and utx.log (equivalent to wtmp) under the utmpx framework, while providing compatibility shims for legacy applications via utmpx.h. The old utmp.h header was removed entirely at that time, compelling software to adopt the extended format for binary compatibility and enhanced features like 64-bit timestamps. In 11 and later, the utmp and wtmp files are obsolete and have been removed from the system, with utmpx becoming the mandatory format stored in /var/adm/utmpx to support larger data structures and better process tracking via the utmpd daemon. distributions, as open-source derivatives of Solaris, follow this model, mandating utmpx and eliminating legacy utmp support to align with modern security and scalability needs. The POSIX.1-2008 standard marks the original utmp functions (e.g., getutent) as obsolescent, standardizing instead the extended getutxent family under <utmpx.h> to promote portability and avoid deprecated 32-bit limitations. Many distributions, including 25.04 and successors, issue warnings during compilation or runtime for legacy utmp usage, urging developers to update code. This impacts older software by causing compilation failures or runtime errors on systems without compatibility layers, often requiring recompilation against utmpx headers and potential redesign of handling.

Alternatives and Future Directions

In modern distributions, systemd-logind has emerged as a primary alternative to utmp for managing user sessions and login tracking. Introduced with in 2010, logind maintains session state in memory and provides interfaces for querying active users, sessions, and seats, effectively replacing the need for writing to utmp and wtmp files in many scenarios. This shift addresses limitations in utmp, such as its vulnerability to the on 32-bit time_t systems, by using 64-bit timestamps and avoiding disk-based binary logs that are prone to corruption. For comprehensive auditing of login events, the Daemon (auditd) serves as a more secure kernel-level mechanism compared to utmp. Auditd captures system calls related to and session , logging them in a structured format to /var/log/audit/audit.log, which supports tamper detection and fine-grained policy enforcement via rulesets. This approach enhances security by integrating with the kernel's audit subsystem, allowing for real-time monitoring of attempts, successes, and failures without relying on user-space files like utmp. In containerized environments such as those managed by and , utmp is frequently bypassed or left unpopulated due to the isolated nature of containers, which do not maintain traditional host-level session tracking. Instead, these platforms use their own mechanisms: tracks container processes via runtime APIs and , while employs pod metadata and controller logs for session-like oversight, often integrating with external logging systems for persistence. On BSD systems, OpenBSM provides an open-source auditing framework that extends beyond utmp by implementing Basic Security Module (BSM) standards for event logging, including detailed records of login activities with cryptographic integrity checks. Adopted in and derivatives since 2003, OpenBSM outputs audit trails in a standardized format suitable for forensic analysis, offering greater granularity and security than utmp's simple session records. Looking ahead, the faces in due to its incompatibility with 64-bit time_t transitions required for Year 2038 compliance, with distributions like already migrating to logind-based implementations. explores encrypted, distributed for environments, such as client-side encrypted access logs that preserve privacy while enabling account security incident attribution across decentralized systems. These developments suggest a toward API wrappers for legacy compatibility and fully integrated, secure auditing in future POSIX-like standards.

References

  1. [1]
    utmp(5) - Linux manual page - man7.org
    The utmp file allows one to discover information about who is currently using the system. There may be more users currently using the system, because not all ...
  2. [2]
    utmp(5) - Manual pages
    DESCRIPTION. The <utmp.h> file declares the structures used to record information about current users in the utmp file, logins and logouts ...Missing: documentation | Show results with:documentation
  3. [3]
    utmp(5) - OpenBSD manual pages
    HISTORY. A file /tmp/utmp first appeared in Version 1 AT&T UNIX and a file /tmp/wtmp in Version 2 AT&T UNIX. The lastlog file format appeared in 3.0BSD.
  4. [4]
    7.6. Creating Essential Files and Symlinks - Linux From Scratch!
    The /var/log/btmp file records the bad login attempts. [Note]. Note. The /run/utmp file records the users that are currently logged in. This file is created ...Missing: Unix | Show results with:Unix<|control11|><|separator|>
  5. [5]
    who(1) - Linux manual page - man7.org
    WHO(1) User Commands WHO(1). NAME top. who - show who is logged on. SYNOPSIS top. who [OPTION]... [ FILE | ARG1 ARG2 ]. DESCRIPTION top.
  6. [6]
  7. [7]
    utmpx - man pages section 5: File Formats
    Jul 27, 2022 · The utmpx database contains user access and accounting information for commands such as who(1), write(1), and login(1).Missing: Sun Microsystems
  8. [8]
    <utmpx.h>
    ### Summary of utmpx Standardization in POSIX or Single UNIX Specification
  9. [9]
    utmp(5) - Linux manual page
    ### Historical Notes and Standardization Info for utmpx
  10. [10]
    What are utmp, wtmp, and btmp Files in Linux?
    Nov 17, 2023 · The utmp file keeps track of the user session in real time. In simple terms, by displaying the content of the utmp file, you can list the ...Missing: documentation | Show results with:documentation
  11. [11]
    <utmpx.h>
    The <utmpx.h> header shall define the utmpx structure that shall include at least the following members: char ut_user[] User login name.Missing: utmp | Show results with:utmp
  12. [12]
    utmpx.h(0p) - Arch manual pages
    This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page ...
  13. [13]
    utmpx(5): login records - Linux man page
    The utmp file allows one to discover information about who is currently using the system. There may be more users currently using the system, ...
  14. [14]
    utmpx.h - man pages section 3: Library Interfaces and Headers
    The utmpx.h header defines the utmpx structure, which includes the following members: char ut_user[]; /* user login name */ char ut_id[]; /* unspecified ...
  15. [15]
    updwtmp(3) - Linux manual page - man7.org
    VERSIONS top. For consistency with the other "utmpx" functions (see getutxent(3)), glibc provides (since glibc 2.1): #define _GNU_SOURCE ...
  16. [16]
    [PDF] Filesystem Hierarchy Standard - Linux Foundation
    Mar 19, 2015 · The utmp file, which stores information about who is currently using the system, is located in this directory. Programs should not access ...
  17. [17]
    utmp - man pages section 5: File Formats
    Jul 27, 2022 · The utmp and wtmp files were removed from Solaris in Solaris 8. Copyright © 1993, 2022, Oracle and/or its affiliates.
  18. [18]
  19. [19]
  20. [20]
  21. [21]
    getutent(3) - Linux manual page
    ### Summary of Functions for Accessing utmp/utmpx Files
  22. [22]
    Old utmp entries - linux - Server Fault
    Jul 20, 2009 · Once utmp even had two entries pointing to the same tty (but belonging to different users). Any ideas why this happens? So far, I manage to fix ...
  23. [23]
  24. [24]
    systemd.exec - Freedesktop.org
    This process is named " (sd-pam) " and is an immediate child process of the unit's main process. Note that when this option is used for a unit it is very likely ...
  25. [25]
    5.13. /var/run : Run-time variable data - Linux Foundation
    It is valid to implement /var/run as a symlink to /run . The utmp file, which stores information about who is currently using the system, is located in this ...Missing: memory | Show results with:memory
  26. [26]
    Understanding reference to /var/log/wtmp in /etc/logrotate.conf
    May 21, 2011 · The first time logrotate runs each month, check the size of the /var/log/wtmp file and if it is larger than 1M bytes rotate it.Logrotate: rotate all log files on specific size and rotate hourlylinux - Apache log files rotation - Server FaultMore results from serverfault.com
  27. [27]
    v2.40-ReleaseNotes - The Linux Kernel Archives
    Introducing a new library, liblastlog2, to implement lastlog replacement using a SQLite3 database in /var/lib/lastlog/lastlog2.db. This implementation is Y2038 ...
  28. [28]
  29. [29]
    who(1) - OpenBSD manual pages
    Jun 19, 2017 · By default, who gathers information from the file /var/run/utmp. An alternate file may be specified which is usually /var/log/wtmp (or /var/log/ ...
  30. [30]
    who(1): who is logged on - Linux man page
    Print information about users who are currently logged in. If FILE is not specified, use /var/run/utmp. /var/log/wtmp as FILE is common.
  31. [31]
    last(1) - NetBSD Manual Pages
    last will list the sessions of specified users, ttys, and hosts, in reverse time order. Each line of output contains the user name, the tty from which the ...<|control11|><|separator|>
  32. [32]
    lastb(1): of last logged in users - Linux man page - Die.net
    Lastb is the same as last, except that by default it shows a log of the file /var/log/btmp, which contains all the bad login attempts.Description · Options · Notes<|separator|>
  33. [33]
    logrotate(8) - Linux manual page
    ### Summary of Rotating wtmp and btmp Files in logrotate
  34. [34]
    A Complete Guide to Managing Log Files with Logrotate - Better Stack
    Jan 13, 2025 · Learn how to use the Logrotate utility to set up automatic rotation, compression and deletion of log files in Linux.
  35. [35]
    utmpdump - dump UTMP and WTMP files in raw format
    utmpdump is a simple program to dump UTMP and WTMP files in raw format, so they can be examined. utmpdump reads from stdin unless a filename is passed.Missing: man page
  36. [36]
    Linux Remove or Clear the Last Login Information - nixCraft
    Feb 27, 2022 · Explains how to remove or clear the last login information on Linux, including clearing out the lastlog record of a user account.
  37. [37]
    Cron Jobs - Theoretical and Computational Biophysics Group
    cron.monthly: perform monthly tasks such as archiving log files and wtmp. cron.weekly: perform weekly tasks such as cleaning nfs and dqs files, remaking ...
  38. [38]
    Red Hat Enterprise Linux: RHSA-2004:174-01 Critical Utempter ...
    In combination with an application that trusts the utmp or wtmp files, this could allow a local attacker the ability to overwrite privileged files using a ...
  39. [39]
    My /var/log/btmp file is huge! What should I do? - Server Fault
    Mar 4, 2010 · My /var/log/btmp file is 1.3 GB in size. I've read that the file is "Used to store information about failed login". What does this mean for my server? And can ...What updates `/var/log/btmp`? How to stop it?security - /var/log/btmp is 6GB, how to trim it down?More results from serverfault.comMissing: Unix | Show results with:Unix
  40. [40]
    Linux Logs Explained: Boost Your System's Performance and Security
    Mar 15, 2025 · Session tracking, including logins, logouts, and reboots (found in btmp, utmp, and wtmp). ... btmp log can indicate brute-force attacks.
  41. [41]
    24492 – utmp/wtmp locking allows non-privileged user to deny service
    Aug 13, 2023 · The utmp locking in glibc relies on lock the utmp database file (i.e. /var/run/utmp). This file is normally readable by non-root users and ...<|separator|>
  42. [42]
    How log rotation works with logrotate | Network World
    Aug 21, 2017 · For wtmp and btmp files, rotation details are included in the /etc/logrotate.conf file. These log files are rotated monthly, and only one ...
  43. [43]
    How to change default file permissions for /var/log/wtmp?
    Oct 9, 2024 · Issue. How to permanently change the default file permissions for /var/log/wtmp ?
  44. [44]
    5 'chattr' Commands to Make Important Files IMMUTABLE ...
    Jul 13, 2023 · To set attribute, we use the + sign and to unset use the – sign with the chattr command. So, let's set immutable bit on the files with +i flags ...Missing: utmp | Show results with:utmp
  45. [45]
    [PDF] Effective Daily Log Monitoring - PCI Security Standards Council
    Since the primary focus of this document is log monitoring within the context of PCI DSS, we will focus on PCI DSS Requirements as the basis for defining ...
  46. [46]
    lastb Command in Linux - Tutorials Point
    lastb is a Linux command that is used to display a list of failed login attempts on the system. It reads the information from the /var/log/btmp file, ...
  47. [47]
    [PDF] PCI DSS Quick Reference Guide
    Nov 2, 2025 · 10.1 Implement audit trails to link all access to system components to each individual user. 10.2 Implement automated audit trails for all ...
  48. [48]
    PCI DSS Requirement 10: Logging & Monitoring Guide - RSI Security
    Jul 25, 2025 · PCI DSS Requirement 10 ensures secure logging and monitoring to detect threats, support incident response, and meet compliance needs.
  49. [49]
    Y2038, glibc and utmp/utmpx on 64bit architectures - Thorsten Kukuk
    Mar 3, 2023 · The general statement so far has always been that on 64bit systems with a 64bit time_t you are safe with respect to the Y2038 problem.Missing: Sun | Show results with:Sun
  50. [50]
    Chapter 9. Deprecated features | Red Hat Enterprise Linux | 10
    The utmp and utmpx interfaces provided by the glibc library include a counter that counts time since the UNIX epoch. This counter will overflow on February 07, ...
  51. [51]
    Y2038: Replace utmp with logind - openSUSE MicroOS
    Sep 28, 2023 · The general statement so far has always been that on 64bit systems with a 64bit time_t you are safe with respect to the Y2038 problem. But ...Missing: Sun | Show results with:Sun
  52. [52]
    FreeBSD 9.0-RELEASE Release Notes
    May 15, 2021 · It had an interoperability issue when transferring a large file.[r224536]. The utmp(5) user accounting database has been replaced by utmpx(3).
  53. [53]
    errors of utmp.h | The FreeBSD Forums
    Nov 28, 2024 · First things first, 14.0-RELEASE is EoL and not supported any more. Second, there is no utmp.h on FreeBSD since 9.0-RELEASE. There is a utmpx.h ...FreeBSD: error: utmp.h: No such file or directoryOld Archive freebsd 9 packagesMore results from forums.freebsd.org
  54. [54]
    illumos: manual page: utmpd.8 - SmartOS
    Directory containing files for processes whose utmpx entries are being monitored. SEE ALSO. svcs(1), poll(2), pututxline(3C), proc(5), utmp(5), utmpx(5),
  55. [55]
    getutent(3) - Linux manual page - man7.org
    getutent() reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line.
  56. [56]
    Plucky Puffin Release Notes - Ubuntu Community Hub
    Oct 11, 2024 · In Ubuntu, systemd is no longer built with utmp support. Among other things, this means that systemd's default /usr/lib/tmpfiles.d/systemd ...
  57. [57]
    Y2038: utmp, utmpx and lastlog problem · Issue #674 - GitHub
    Feb 28, 2023 · In this investigation I'll try to go deeper into the dependencies that shadow-utils has with respect to the interfaces affected by the Y2038 ...
  58. [58]
    Y2038 and utmp/wtmp/lastlog on bi-arch systems like x86-64 with glibc
    Mar 1, 2023 · Many 64bit systems with glibc uses a 32bit time_t for utmp, wtmp and lastlog, to provide compatibility with a 32bit userland.
  59. [59]
    auditd(8) - Linux manual page - man7.org
    auditd is the userspace component to the Linux Auditing System. It's responsible for writing audit records to the disk.Description Top · Options Top · Signals Top
  60. [60]
    Configure Linux system auditing with auditd - Red Hat
    Oct 26, 2021 · Based on preconfigured rules and properties, the audit daemon ( auditd ) generates log entries to record information about the events happening ...Missing: alternative utmp
  61. [61]
    Empty utmp database on Ubuntu container - General
    Apr 7, 2021 · Hi guys, I've deploy an Ubuntu container and I've seen utmp db is empty is I run bash using docker exec, it seems to be created but it ...Missing: session tracking
  62. [62]
    OpenBSM - TrustedBSD
    OpenBSM is an open-source BSM implementation, the core of TrustedBSD's audit, providing tools, libraries, and include files for FreeBSD.
  63. [63]
    [PDF] Encrypted Access Logging for Online Accounts: Device Attributions ...
    Aug 15, 2025 · We propose client-side encrypted access logging (CSAL) as a new approach that navigates the tension between tracking privacy and ASI utility.