/
identd.8
181 lines (181 loc) · 4.06 KB
/
identd.8
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
.\" $NetBSD: identd.8,v 1.18 2004/01/31 22:39:24 wiz Exp $
.\"
.\" This software is in the public domain.
.\" Written by Peter Postma <peter@pointless.nl>
.\"
.Dd January 31, 2004
.Dt IDENTD 8
.Os
.Sh NAME
.Nm identd
.Nd TCP/IP Ident protocol server
.Sh SYNOPSIS
.Nm
.Op Fl 46beIilNnr
.Op Fl a Ar address
.Op Fl c Ar charset
.Op Fl F Ar format
.Op Fl f Ar fallback
.Op Fl g Ar uid
.Op Fl L Ar username
.Op Fl o Ar osname
.Op Fl p Ar portno
.Op Fl t Ar seconds
.Op Fl u Ar uid
.Sh DESCRIPTION
.Nm
is a TCP/IP server which implements the user identification protocol
as specified in RFC 1413.
.Pp
.Nm
operates by looking up specific TCP/IP connections and returning
information which may or may not be associated with the process owning
the connection.
.Pp
The following options are available:
.Bl -tag -width XXxXusernameXX
.It Fl 4
Bind to IPv4 addresses only.
(flag
.Fl b
only)
.It Fl 6
Bind to IPv6 addresses only.
(flag
.Fl b
only)
.It Fl a Ar address
Bind to the specified
.Ar address .
This may be an IPv4 or IPv6 address or even a hostname.
If a hostname is specified then
.Nm
will resolve it to an address (or addresses) and will bind this address.
(flag
.Fl b
only)
.It Fl b
Run in the background (as daemon).
.It Fl c Ar charset
Specfify an optional character set designator to be included in replies.
.Ar charset
should be a valid charset set as described in the
.Tn MIME RFC
in upper case characters.
.It Fl e
Return
.Dq UNKNOWN-ERROR
instead of the usual
.Dq NO-USER
or
.Dq INVALID-PORT
error replies.
.It Fl F Ar format
Specify the format to display info.
The allowed format specifiers are:
.Bd -literal
%u print user name
%U print user number
%g print (primary) group name
%G print (primary) group number
%l print list of all groups by name
%L print list of all groups by number
.Ed
.Pp
The lists of groups (%l, %L) are comma-separated, and start with the primary
group which is not repeated.
Any other characters (preceded by %, and those not preceded by it)
are printed literally.
The
.Dq default
format is %u, and you should not use anything else without using the flag
.Fl o Ar OTHER .
.It Fl f Ar fallback
Specify a
.Ar fallback
username.
If the lookup fails then this username will be returned.
This can be useful for when running this service on a NAT host.
.It Fl g Ar gid
Specify the group id number or name which the server should switch to after
binding itself to the TCP/IP port.
.It Fl I
Same as
.Fl i
but without the restriction that the username in
.Pa .ident
must not match an existing user.
.It Fl i
If the
.Pa .ident
file exists in the home directory of the identified user, return the username
found in that file instead of the real username.
If the username found in
.Pa .ident
is that of an existing user, then the real username will be returned.
.It Fl L Ar username
Specify a
.Dq lie
.Ar username .
Return this name for all ident requests.
.It Fl l
Use
.Xr syslogd 8
for logging.
.It Fl N
Enable
.Pa .noident
files.
If this file exists in the home directory of the identified user then return
.Dq HIDDEN-USER
instead of the normal USERID response.
.It Fl n
Return numeric user IDs instead of usernames.
.It Fl o Ar osname
Return
.Ar osname
instead of the default
.Dq UNIX .
.It Fl p Ar portno
Specify an alternative port number under which the server should run.
The default is port 113.
(flag
.Fl b
only)
.It Fl r
Return a random name of alphanumeric characters.
If the
.Fl n
flag is also enabled then a random number will be returned.
.It Fl t Ar seconds
Specify a timeout for the service.
The default timeout is 30 seconds.
.It Fl u Ar uid
Specify the user id number or name to which the server should switch after
binding itself to the TCP/IP port.
.El
.Sh FILES
.Pa /etc/inetd.conf
.Sh EXAMPLES
.Nm
operates from
.Xr inetd 8
or as standalone daemon.
Put the following lines into
.Xr inetd.conf 5
to enable
.Nm
as an IPv4 and IPv6 service via inetd:
.Pp
ident stream tcp nowait nobody /usr/libexec/identd identd -l
.Pp
ident stream tcp6 nowait nobody /usr/libexec/identd identd -l
.Pp
If you want to run
.Nm
as standalone daemon then please use the
.Fl b
flag (background).
.Sh SEE ALSO
.Xr inetd.conf 5 ,
.Xr inetd 8