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