File: oidentd.conf.5.adoc

package info (click to toggle)
oidentd 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,324 kB
  • sloc: sh: 4,582; ansic: 4,062; yacc: 477; lex: 341; makefile: 84
file content (453 lines) | stat: -rw-r--r-- 11,623 bytes parent folder | download
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
////
Copyright (c)  2019  Janik Rabe

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the file 'COPYING.DOC'
////

oidentd.conf(5)
===============
:doctype:      manpage
:man manual:   oidentd User Manual
:man source:   oidentd
:reproducible: yes
:revdate:      2023-03-11
:sysconfdir:   /etc


NAME
----

oidentd.conf - oidentd configuration files


DESCRIPTION
-----------

The *oidentd* configuration files are used to control the responses *oidentd*
sends to clients after receiving a query for a connection owned by a particular
user.

The system-wide configuration file *{sysconfdir}/oidentd.conf* specifies the
types of responses individual users are permitted to send.  By default, users
must respond with their real username.

The user configuration files *~/.config/oidentd.conf* allow users to send
custom Ident responses or to hide their identities, provided that they have
been granted the necessary capabilities through the system-wide configuration
file.  If this file does not exist or *oidentd* was compiled without XDG Base
Directory support, the file *~/.oidentd.conf* is used instead.
Note that user configuration files are read only after a connection is
determined to belong to the user in question.


SYSTEM-WIDE CONFIGURATION FILE
------------------------------

The system-wide configuration file is used to grant capabilities to users or
force users to use a certain capability.  The default behavior is not to grant
any privileges, which means that all users must send their real usernames in
response to Ident queries.  The system-wide configuration file may be empty or
missing, in which case this default applies.  Changes to this file take effect
only after *oidentd* is reloaded (which occurs when a SIGHUP signal is
received) or restarted.

The system-wide configuration file contains zero or one directive of the
following form:

[subs="quotes"]
....
**default** {
	__range-directives...__
}
....

This default directive matches all users for which no explicit rules have been
defined.  Any user directives following this directive inherit the capabilities
it defines.  If present, the default directive should be the first directive in
the user configuration file.

The system-wide configuration file may also contain zero or more directives of
the following form:

[subs="quotes"]
....
**user** __username__ {
	__range-directives...__
}
....

This user directive applies only to the specified user.


USER CONFIGURATION FILE
-----------------------

Each user may create a user configuration file at *~/.config/oidentd.conf* or
*~/.oidentd.conf*.  This file must be readable by the user *oidentd* runs as.
The user configuration file is read automatically after every successful
lookup, so any changes take effect immediately.

The user configuration file contains zero or one directive of the following
form:

[subs="quotes"]
....
**global** {
	__capability-statements...__
}
....

This global directive matches all connections owned by the user.  If present, it
should be the first directive in the user configuration file.

The user configuration file may also contain zero or more directives of the
following form:

[subs="quotes"]
....
__range-specification__ {
	__capability-statements...__
}
....

This range directive applies only to connections that match the given range
specification.


RANGE DIRECTIVES
----------------

At most one range directive in any given scope may take the following form:

[subs="quotes"]
....
**default** {
	__capability-directives...__
}
....

This default directive defines rules for all connections that do not match any
other range directive.  If present, the default directive should be the first
directive in its scope.

A range directive may also take the following form:

[subs="quotes"]
....
__range-specification__ {
	__capability-directives...__
}
....

This range directive applies only to connections that match the given range
specification.


RANGE SPECIFICATIONS
--------------------

A range specification consists of filters that define which connections a range
directive applies to.  It takes the following form:

[subs="quotes"]
....
**to** __fhost__ **fport** __fport__ **from** __lhost__ **lport** __lport__
....

This range specification matches only connections with the specified foreign
host, foreign port, local host, and local port.  At least one of these filters
must be specified.  Omitted filters match any value.  Filters may be specified
in any order.

The _fhost_ filter specifies the foreign host or address of a connection, from
the perspective of the machine running *oidentd*.

The _fport_ filter specifies the foreign port or port range of a connection.

The _lhost_ filter specifies the local host or address of a connection, from
the perspective of the machine running *oidentd*.  This may be useful for
supporting virtual hosts on systems with more than one IP address.

The _lport_ filter specifies the local port or port range of a connection.

Ports can be specified either numerically (e.g., 113) or using a service name
(e.g., ident).  Port ranges are specified numerically as __min__:__max__.  The
_min_ port may be omitted to select all ports less than or equal to the _max_
port.  Likewise, the _max_ port may be omitted to select all ports greater than
or equal to the _min_ port.


CAPABILITY DIRECTIVES
---------------------

A capability directive may take one of the following forms:

[subs="quotes"]
....
**allow** __capability__
....

In this form, the directive grants the user permission to use the specified
capability.

[subs="quotes"]
....
**deny** __capability__
....

In this form, the directive revokes the user's permission to use the specified
capability.

[subs="quotes"]
....
**force** __capability-statement__
....

In this form, the directive forces the user to use the specified capability.

CAPABILITIES
------------

The following expressions are valid capabilities:

[subs="quotes"]
....
**forward**
**hide**
**numeric**
**random**
**random_numeric**
....

These capabilities allow users to use the corresponding capability statements.

[subs="quotes"]
....
**spoof**
....

The *spoof* capability allows users to send custom Ident replies.  Note that
this does not include replying with the name of another user or spoofing
replies for connections to privileged foreign ports.

[subs="quotes"]
....
**spoof_all**
....

The *spoof_all* capability allows users to reply with the names of other users.
This capability should be used with care, as it allows users to impersonate
other users on the local system.  The *spoof_all* capability only works in
conjunction with *spoof*, but does not imply it.

[subs="quotes"]
....
**spoof_privport**
....

The *spoof_privport* capability allows users to spoof replies for connections to
privileged foreign ports (with port numbers below 1024).  The *spoof_privport*
capability only works in conjunction with *spoof*, but does not imply it.


CAPABILITY STATEMENTS
---------------------

A capability statement may take one of the following forms:

[subs="quotes"]
....
**forward** __host__ __port__
....

Forward received queries to another Ident server.  The target server must
support forwarding (like *oidentd* with the *--proxy* option).

Additional capabilities may be required for forwarding to succeed.  For example,
the *spoof* capability is required if the target server sends a response other
than the user's name on the forwarding server.  It may therefore be desirable to
also grant at least one of *hide*, *spoof*, *spoof_all*, and *spoof_privport* in
addition to the *forward* capability.  If *force forward* is used, no additional
checks are performed and no capabilities are required.

If forwarding fails, *oidentd* responds with a "HIDDEN-USER" error or with the
user's real username, depending on whether the user has been granted the *hide*
capability.  Replies are logged, allowing the system administrator to identify
which user sent a particular reply.

[subs="quotes"]
....
**hide**
....

Hide Ident replies from clients.  When this capability is used, *oidentd*
reports a "HIDDEN-USER" error to Ident clients instead of sending an Ident
reply.

[subs="quotes"]
....
**numeric**
....

Respond with the user ID (UID).

[subs="quotes"]
....
**random**
....

Send randomly generated, alphanumeric Ident replies.  A new reply is generated
for each Ident lookup.  Replies are logged, allowing the system administrator
to identify which user sent a particular reply.

[subs="quotes"]
....
**random_numeric**
....

Send randomly generated, numeric Ident replies between 0 (inclusive) and
100,000 (exclusive), prefixed with "user".  A new reply is generated for each
Ident lookup.  Replies are logged, allowing the system administrator to
identify which user sent a particular reply.

[subs="quotes"]
....
**reply** __reply1__ [__reply2__ ...]
....

Send an Ident reply chosen at random from the given list of quoted replies.
When used in a user configuration file, at most 20 replies may be specified.
In the system-wide configuration file, up to 255 replies may be specified.
Replies are logged, allowing the system administrator to identify which user
sent a particular reply.


EXAMPLES
--------

=== SYSTEM-WIDE CONFIGURATION FILE

[subs="quotes"]
....
**default** {
	**default** {
		**allow** **spoof**
	}

	**fport** 6667 {
		**deny** **spoof**
		**allow** **hide**
	}
}
....

Allow all users to spoof Ident replies, except on connections to port 6667.
Only on connections to port 6667, allow users to hide their Ident replies.

[subs="quotes"]
....
**user** "root" {
	**default** {
		**force** **hide**
	}
}
....

Hide all connections owned by the root user.

[subs="quotes"]
....
**user** "lisa" {
	**lport** 1024: {
		**force** **reply** "me"
	}
}
....

For connections owned by user "lisa" on local port 1024 or greater, always reply
with "me", ignoring any settings in the user configuration file.


=== USER CONFIGURATION FILE

[subs="quotes"]
....
**global** {
	**reply** "paul"
}
....

Reply with "paul" to all Ident queries.

[subs="quotes"]
....
**to** irc.example.net **fport** 6667 {
	**hide**
}
....

Hide Ident replies for connections to irc.example.net on port 6667.


STRING FORMATTING
-----------------

Strings may be enclosed in double quotes.  This is useful for strings containing
special characters that would otherwise be interpreted in an unintended way.

Quoted strings may contain the following escape sequences:

[subs="quotes"]
....
\a    alert (bell)
\b    backspace
\f    form feed
\n    newline (line feed)
\r    carriage return
\t    horizontal tab
\v    vertical tab
\\:\    backslash
\"    double quotation mark
\\:__NNN__  the character with octal numerical value __NNN__
\x__NN__  the character with hexadecimal numerical value __NN__
....


COMMENTS
--------

After encountering a number sign ("#"), *oidentd* ignores any remaining text on
the same line.  This allows users to add comments to the configuration file.
Comments can also be written in the following form, which allows them to span
multiple lines:

[subs="quotes"]
....
/* __comment__ */
....


AUTHOR
------

mailto:info@janikrabe.com[Janik Rabe]::
  https://janikrabe.com

Originally written by Ryan McCabe.


BUGS
----

Please report any bugs to mailto:info@janikrabe.com[Janik Rabe].


SEE ALSO
--------

*oidentd*(8)
*oidentd_masq.conf*(5)