]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/utx/utx.8
sys/{x86,amd64}: remove one of doubled ;s
[FreeBSD/FreeBSD.git] / usr.sbin / utx / utx.8
1 .\" Copyright (c) 2011-2012 Ed Schouten <ed@FreeBSD.org>
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd November 3, 2013
28 .Dt UTX 8
29 .Os
30 .Sh NAME
31 .Nm utx
32 .Nd manage the user accounting database
33 .Sh SYNOPSIS
34 .Nm
35 .Cm boot
36 .Nm
37 .Cm shutdown
38 .Nm
39 .Cm rm
40 .Ar identifier
41 .Ar ...
42 .Sh DESCRIPTION
43 The
44 .Nm
45 utility can be used to perform operations on the user accounting
46 database, as done by
47 .Xr pututxline 3 .
48 .Pp
49 The first argument to
50 .Nm
51 indicates an action to be performed:
52 .Bl -tag -width ".Cm shutdown"
53 .It Cm boot
54 Write a boot time record to the user accounting database.
55 This option should typically only be used by
56 .Xr rc 8 .
57 .It Cm shutdown
58 Write a shutdown time record to the user accounting database.
59 This option should typically only be used by
60 .Xr rc 8 .
61 .It Cm rm
62 Remove stale sessions from the user accounting
63 database, by referring to their
64 .Ar identifier .
65 Stale sessions can occur if a login service exits prematurely or fails
66 to remove the session from the accounting database.
67 .Pp
68 Utilities such as
69 .Xr w 1
70 will not display the identifier corresponding with a login session,
71 since its value is typically only of use by the process managing the
72 record.
73 The following command can be used to obtain all records from the user
74 accounting database's active session table, including its identifiers:
75 .Pp
76 .Dl getent utmpx active
77 .Pp
78 Identifiers can either be supplied in hexadecimal form as displayed by
79 .Xr getent 1 ,
80 or as a string if the identifier allows such a representation.
81 .El
82 .Pp
83 Because this utility requires write-access to the user accounting
84 database, its use is limited to the super-user.
85 .Sh SEE ALSO
86 .Xr getent 1 ,
87 .Xr w 1 ,
88 .Xr pututxline 3
89 .Sh HISTORY
90 The
91 .Nm
92 utility replaced
93 .Nm utxrm
94 in
95 .Fx 10.0 .
96 .Sh AUTHORS
97 .An Ed Schouten Aq Mt ed@FreeBSD.org