utmpset(8) System Manager's Manual utmpset(8)

# [NAME](#NAME)

utmpset - logout a line from utmp and wtmp file

# [SYNOPSIS](#SYNOPSIS)

**utmpset** \[ **-w** ] *line*

# [DESCRIPTION](#DESCRIPTION)

The **utmpset** program modifies the user accounting database [**utmp**(5)](/man/os/runit/utmp.5) and optionally [**wtmp**(5)](/man/os/runit/wtmp.5) to indicate that the user on the terminal *line* has logged out.

Ordinary [**init**(8)](/man/os/runit/init.8) processes handle utmp file records for local login accounting. The [**runit**(8)](/man/os/runit/runit.8) program doesn't include code to update the utmp file, the [**getty**(8)](/man/os/runit/getty.8) processes are handled the same as all other services.

To enable local login accounting, add **utmpset** to the [**getty**(8)](/man/os/runit/getty.8) *finish* scripts, e.g.:

$ cat /service/getty-5/finish  
#!/bin/sh  
exec utmpset -w tty5  
$

# [OPTIONS](#OPTIONS)

[**-w**](#w)

wtmp. Additionally to the utmp file, write an empty record for *line* to the wtmp file.

# [EXIT CODES](#EXIT_CODES)

**utmpset** returns 111 on error, 1 on wrong usage, 0 in all other cases.

# [SEE ALSO](#SEE_ALSO)

[sv(8)](/man/os/runit/sv.8), [runsv(8)](/man/os/runit/runsv.8), [runit(8)](/man/os/runit/runit.8), [runit-init(8)](/man/os/runit/runit-init.8) [runsvdir(8)](/man/os/runit/runsvdir.8), [runsvchdir(8)](/man/os/runit/runsvchdir.8), [chpst(8)](/man/os/runit/chpst.8), [svlogd(8)](/man/os/runit/svlogd.8), [getty(8)](/man/os/runit/getty.8)

https://smarden.org/runit/

# [AUTHOR](#AUTHOR)

Gerrit Pape &lt;pape@smarden.org&gt;

---

Document: utmpset(8) from runit 2.3.1-r5 (Chainguard OS)
Source: https://github.com/g-pape/runit
