xref: /dragonfly/usr.bin/finger/finger.1 (revision ed36d35d)
1.\" Copyright (c) 1989, 1990, 1993, 1994
2.\"	The Regents of the University of California.  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.\" 3. Neither the name of the University nor the names of its contributors
13.\"    may be used to endorse or promote products derived from this software
14.\"    without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\"	@(#)finger.1	8.3 (Berkeley) 5/5/94
29.\" $FreeBSD: src/usr.bin/finger/finger.1,v 1.9.2.12 2003/02/25 20:31:18 trhodes Exp $
30.\" $DragonFly: src/usr.bin/finger/finger.1,v 1.4 2004/09/03 19:13:23 dillon Exp $
31.\"
32.Dd August 30, 2004
33.Dt FINGER 1
34.Os
35.Sh NAME
36.Nm finger
37.Nd user information lookup program
38.Sh SYNOPSIS
39.Nm
40.Op Fl 468glmpshoT
41.Op Ar user ...\&
42.Op Ar user@host ...\&
43.Sh DESCRIPTION
44The
45.Nm
46utility displays information about the system users.
47.Pp
48Options are:
49.Bl -tag -width indent
50.It Fl 4
51Forces
52.Nm
53to use IPv4 addresses only.
54.It Fl 6
55Forces
56.Nm
57to use IPv6 addresses only.
58.It Fl 8
59Pass through 8-bit data.  This option is intended for enabling 8-bit
60data output in the
61.Xr fingerd 8
62service.  Using this from the command line is
63.Em dangerous ,
64as the output data may include control characters for your terminal.
65.It Fl s
66Display the user's login name, real name, terminal name and write
67status (as a ``*'' before the terminal name if write permission is
68denied), idle time, login time, and either office location and office
69phone number, or the remote host.
70If
71.Fl o
72is given, the office location and office phone number is printed
73(the default).
74If
75.Fl h
76is given, the remote host is printed instead.
77.Pp
78Idle time is in minutes if it is a single integer, hours and minutes
79if a ``:'' is present, or days if a ``d'' is present.
80If it is an
81.Dq * ,
82the login time indicates the time of last login.
83Login time is displayed as the day name if less than 6 days, else month, day;
84hours and minutes, unless more than six months ago, in which case the year
85is displayed rather than the hours and minutes.
86.Pp
87Unknown devices as well as nonexistent idle and login times are
88displayed as single asterisks.
89.It Fl h
90When used in conjunction with the
91.Fl s
92option, the name of the remote host is displayed instead of the office
93location and office phone.
94.It Fl o
95When used in conjunction with the
96.Fl s
97option, the office location and office phone information is displayed
98instead of the name of the remote host.
99.It Fl g
100This option restricts the gecos output to only the users' real
101name.
102It also has the side-effect of restricting the output
103of the remote host when used in conjunction with the
104.Fl h
105option.
106.It Fl l
107Produce a multi-line format displaying all of the information
108described for the
109.Fl s
110option as well as the user's home directory, home phone number, login
111shell, mail status, and the contents of the files
112.Pa .forward ,
113.Pa .plan ,
114.Pa .project
115and
116.Pa .pubkey
117from the user's home directory.
118.Pp
119If idle time is at least a minute and less than a day, it is
120presented in the form ``hh:mm''.
121Idle times greater than a day are presented as ``d day[s]hh:mm''.
122.Pp
123Phone numbers specified as eleven digits are printed as ``+N-NNN-NNN-NNNN''.
124Numbers specified as ten or seven digits are printed as the appropriate
125subset of that string.
126Numbers specified as five digits are printed as ``xN-NNNN''.
127Numbers specified as four digits are printed as ``xNNNN''.
128.Pp
129If write permission is denied to the device, the phrase ``(messages off)''
130is appended to the line containing the device name.
131One entry per user is displayed with the
132.Fl l
133option; if a user is logged on multiple times, terminal information
134is repeated once per login.
135.Pp
136Mail status is shown as ``No Mail.'' if there is no mail at all, ``Mail
137last read DDD MMM ## HH:MM YYYY (TZ)'' if the person has looked at their
138mailbox since new mail arriving, or ``New mail received ...'', ``Unread
139since ...'' if they have new mail.
140.It Fl p
141Prevent
142the
143.Fl l
144option of
145.Nm
146from displaying the contents of the
147.Pa .forward ,
148.Pa .plan ,
149.Pa .project
150and
151.Pa .pubkey
152files.
153.It Fl m
154Prevent matching of
155.Ar user
156names.
157.Ar User
158is usually a login name; however, matching will also be done on the
159users' real names, unless the
160.Fl m
161option is supplied.
162All name matching performed by
163.Nm
164is case insensitive.
165.It Fl T
166Disable the piggybacking of data on the initial connection request.
167This option is needed to finger hosts with a broken TCP implementation.
168.El
169.Pp
170If no options are specified,
171.Nm
172defaults to the
173.Fl l
174style output if operands are provided, otherwise to the
175.Fl s
176style.
177Note that some fields may be missing, in either format, if information
178is not available for them.
179.Pp
180If no arguments are specified,
181.Nm
182will print an entry for each user currently logged into the system.
183.Pp
184The
185.Nm
186utility may be used to look up users on a remote machine.
187The format is to specify a
188.Ar user
189as
190.Dq Li user@host ,
191or
192.Dq Li @host ,
193where the default output
194format for the former is the
195.Fl l
196style, and the default output format for the latter is the
197.Fl s
198style.
199The
200.Fl l
201option is the only option that may be passed to a remote machine.
202.Pp
203If the file
204.Pa .nofinger
205exists in the user's home directory,
206.Nm
207behaves as if the user in question does not exist.
208.Pp
209The optional
210.Xr finger.conf 5
211configuration file can be used to specify aliases.
212Since
213.Nm
214is invoked by
215.Xr fingerd 8 ,
216aliases will work for both local and network queries.
217.Sh ENVIRONMENT
218The
219.Nm
220utility utilizes the following environment variable, if it exists:
221.Bl -tag -width Fl
222.It Ev FINGER
223This variable may be set with favored options to
224.Nm .
225.El
226.Sh FILES
227.Bl -tag -width /var/log/lastlog -compact
228.It Pa /etc/finger.conf
229alias definition data base
230.It Pa /var/log/lastlog
231last login data base
232.El
233.Sh SEE ALSO
234.Xr chpass 1 ,
235.Xr w 1 ,
236.Xr who 1 ,
237.Xr finger.conf 5 ,
238.Xr fingerd 8
239.Rs
240.%A D. Zimmerman
241.%T The Finger User Information Protocol
242.%R RFC 1288
243.%D December, 1991
244.Re
245.Sh HISTORY
246The
247.Nm
248command appeared in
249.Bx 3.0 .
250.Sh BUGS
251The current FINGER protocol RFC requires that the client keep the connection
252fully open until the server closes.
253This prevents the use of the optimal
254three-packet T/TCP exchange.
255(Servers which depend on this requirement are
256bogus but have nonetheless been observed in the Internet at large.)
257