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