]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/utx/utx.8
zfs: merge openzfs/zfs@a382e2119
[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 .Dd November 3, 2013
26 .Dt UTX 8
27 .Os
28 .Sh NAME
29 .Nm utx
30 .Nd manage the user accounting database
31 .Sh SYNOPSIS
32 .Nm
33 .Cm boot
34 .Nm
35 .Cm shutdown
36 .Nm
37 .Cm rm
38 .Ar identifier
39 .Ar ...
40 .Sh DESCRIPTION
41 The
42 .Nm
43 utility can be used to perform operations on the user accounting
44 database, as done by
45 .Xr pututxline 3 .
46 .Pp
47 The first argument to
48 .Nm
49 indicates an action to be performed:
50 .Bl -tag -width ".Cm shutdown"
51 .It Cm boot
52 Write a boot time record to the user accounting database.
53 This option should typically only be used by
54 .Xr rc 8 .
55 .It Cm shutdown
56 Write a shutdown time record to the user accounting database.
57 This option should typically only be used by
58 .Xr rc 8 .
59 .It Cm rm
60 Remove stale sessions from the user accounting
61 database, by referring to their
62 .Ar identifier .
63 Stale sessions can occur if a login service exits prematurely or fails
64 to remove the session from the accounting database.
65 .Pp
66 Utilities such as
67 .Xr w 1
68 will not display the identifier corresponding with a login session,
69 since its value is typically only of use by the process managing the
70 record.
71 The following command can be used to obtain all records from the user
72 accounting database's active session table, including its identifiers:
73 .Pp
74 .Dl getent utmpx active
75 .Pp
76 Identifiers can either be supplied in hexadecimal form as displayed by
77 .Xr getent 1 ,
78 or as a string if the identifier allows such a representation.
79 .El
80 .Pp
81 Because this utility requires write-access to the user accounting
82 database, its use is limited to the super-user.
83 .Sh SEE ALSO
84 .Xr getent 1 ,
85 .Xr w 1 ,
86 .Xr pututxline 3
87 .Sh HISTORY
88 The
89 .Nm
90 utility replaced
91 .Nm utxrm
92 in
93 .Fx 10.0 .
94 .Sh AUTHORS
95 .An Ed Schouten Aq Mt ed@FreeBSD.org