Software
skarnet.org

# utmps

## What is it ?

utmps is an implementation of the `utmpx.h` family of functions performing user accounting on Unix systems.

Traditionally, `utmp` functionality is provided by the system's libc. However, not all libcs implement utmp: for instance the musl libc, on Linux, does not. The main reason for it is that `utmp` functionality is difficult to implement in a secure way; in particular, it is impossible to implement without either running a daemon or allowing arbitrary programs to tamper with user accounting.

`utmps` is a secure implementation of user accounting, using a daemon as the only authority to manage the utmp and wtmp data; programs running utmp functions are just clients to this daemon.

- An overview of utmps

## Installation

### Requirements

- A POSIX-compliant system with a standard C development environment
- GNU make, version 3.81 or later
- skalibs version 2.14.4.0 or later. It's a build-time requirement. It's also a run-time requirement if you link against the shared version of the skalibs library.
- s6 version 2.13.2.0 or later. It's a run-time requirement only, to run the utmpd and wtmpd services (and can be done without if you have a suitable replacement for s6-ipcserver).

### Licensing

utmps is free software. It is available under the ISC license.

### Download

- The current released version of utmps is 0.1.3.0. You can access its checksum here.
- Alternatively, you can checkout a copy of the utmps git repository:

       git clone git://git.skarnet.org/utmps

- There's also a GitHub mirror of the utmps git repository.

### Compilation

- See the enclosed INSTALL file for installation details.

### Upgrade notes

- This page lists the differences to be aware of between the previous versions of utmps and the current one.

## Reference

### Commands

- The `utmps-utmpd` program
- The `utmps-wtmpd` program
- The `utmps-write` program

### Libraries

- The `utmps` library interface
- The `utmpx.h` library interface is implemented on top of the utmps library.
- The `logwtmp()` and `updwtmpx()` functions are also implemented.

## Related resources

### utmps discussion

- `utmps` is discussed on the skaware mailing-list.