1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
.\" $OpenBSD: identd.8,v 1.27 2008/05/24 02:33:05 brad Exp $
.\"
.\" Copyright (c) 1997, Jason Downs. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)identd.8 1.9 92/02/11 Lysator
.\" Copyright (c) 1992 Peter Eriksson, Lysator, Linkoping University.
.\" This software has been released into the public domain.
.\"
.Dd $Mdocdate: May 24 2008 $
.Dt IDENTD 8
.Os
.Sh NAME
.Nm identd
.Nd TCP/IP IDENT protocol server
.Sh SYNOPSIS
.Nm identd
.Bk -words
.Op Fl 46dehlmNnoUv
.Op Fl b | i | w
.Op Fl a Ar address
.Op Fl c Ar charset
.Op Fl g Ar gid
.Op Fl p Ar port
.Op Fl t Ar seconds
.Op Fl u Ar uid
.Ek
.Sh DESCRIPTION
.Nm
is a server which implements the TCP/IP proposed standard
IDENT user identification protocol
as specified in the RFC 1413 document.
.Pp
.Nm
operates by looking up specific TCP/IP
connections and returning the user name of the
process owning the connection.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl 4
When
.Fl b
is specified, forces
.Nm
to use IPv4 addresses only.
.It Fl 6
When
.Fl b
is specified, forces
.Nm
to use IPv6 addresses only.
.It Fl a Ar address
Specify a local IP address in dotted quad format
to bind the listen socket to if running as a stand-alone daemon.
By default the daemon listens on all local IP addresses.
.It Fl b
Specify operation as a stand-alone daemon.
.It Fl c Ar charset
Specify an optional character set designator to be included in replies.
.Ar charset
should be a valid character set as described in the
MIME RFC in upper case characters.
.It Fl d
This flag enables some debugging code that normally should NOT
be enabled since that breaks the protocol and may reveal information
that should not be available to outsiders.
.It Fl e
Always return
.Dq UNKNOWN-ERROR
instead of the
.Dq NO-USER
or
.Dq INVALID-PORT
errors.
.It Fl g Ar gid
Specify a group ID number or group name which the
.Nm
server should
switch to after binding itself to the
TCP/IP port if running as a stand-alone daemon.
.It Fl H
Hide information about non existing users (e.g., connections through NAT) as
well as existing users.
Implies
.Fl h .
.It Fl h
Hide the actual information about the user by providing an opaque
token instead.
This token is entered into the local system logs
so that the administrator can later discover who the real user was.
.It Fl i
Tells
.Nm identd
to run as a process started from
.Xr inetd 8
with the "nowait" option in the
.Pa /etc/inetd.conf
file.
Use of this mode will make
.Xr inetd 8
start one
.Nm
daemon for each connection request.
This is the default mode of operation.
.It Fl l
Use
.Xr syslogd 8
for logging purposes.
.It Fl m
Allow multiple requests to be processed per session.
Each request is specified one per line and the responses will be returned
one per line.
The connection will not be closed until the client closes its end of
the connection.
PLEASE NOTE THAT THIS MODE VIOLATES THE PROTOCOL SPECIFICATION AS
IT CURRENTLY STANDS.
.It Fl N
When replying with a user name or ID, first
check for a file
.Pa .noident
in the user's home directory.
If this file is accessible, return
.Dq HIDDEN-USER
instead of the normal USERID response.
.It Fl n
Always return UID numbers instead of usernames.
.It Fl o
Do not reveal operating system type;
always return
.Dq OTHER
instead.
.It Fl p Ar port
Specify an alternative port number or service name
on which to listen when running as a stand-alone daemon.
Default is "auth" (113).
.It Fl t Ar seconds
Specifies an idle timeout in seconds where a daemon running in
"wait" mode will timeout and exit.
The default is no timeout.
.It Fl U
When replying with a user name or ID, first
check for a file
.Pa .ident
in the user's home directory.
If this file is accessible, return
at most 20 characters of the first line of the file
instead of the normal USERID response.
.It Fl u Ar uid
Specify a user ID number or user name which the
.Nm identd
server should
switch to after binding itself to the
TCP/IP port if running as a stand-alone daemon.
.Nm
runs as user
.Qq _identd
by default and falls back to
.Qq nobody
if the
.Qq _identd
user does not exist.
.It Fl v
Log every request to syslog if
.Fl l
above is specified.
.It Fl w
Tells
.Nm identd
to run as a process started from
.Xr inetd 8
with the "wait" option in the
.Pa /etc/inetd.conf
file.
This mode of operation will start a copy of
.Nm
at the first connection request and then
.Nm
will handle subsequent requests.
Previous versions listed this as the preferred mode of
operation due to the initial overhead of parsing the kernel nlist.
This version does not use kmem or nlist parsing, so this reasoning
is no longer valid.
.El
.Sh SEE ALSO
.Xr inetd.conf 5
.Sh NOTES
.Nm
uses the
.Li LOG_DAEMON
.Xr syslogd 8
facility to log messages.
.Pp
Unlike previous versions of
.Nm identd ,
this version uses
.Xr sysctl 3
to obtain information from the kernel instead of parsing kmem.
This version does not require privilege beyond what is needed to bind
the listen port if running as a stand-alone daemon.
.Sh BUGS
Since
.Nm identd
should typically not be run as a privileged user or group,
.Pa .ident
files for use when running with the
.Fl U
flag will need to be world accessible.
The same applies for
.Pa .noident
files when running with the
.Fl N
flag.
|