2016-12-12 13:07:48 +03:00
|
|
|
.\" $NetBSD: identd.8,v 1.22 2016/12/12 10:07:48 wiz Exp $
|
1997-10-08 11:07:40 +04:00
|
|
|
.\"
|
2004-02-01 00:47:17 +03:00
|
|
|
.\" This software is in the public domain.
|
2005-04-04 02:15:32 +04:00
|
|
|
.\" Written by Peter Postma <peter@NetBSD.org>
|
1994-02-05 00:41:32 +03:00
|
|
|
.\"
|
2016-12-10 08:43:11 +03:00
|
|
|
.Dd December 9, 2016
|
2004-02-01 00:47:17 +03:00
|
|
|
.Dt IDENTD 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm identd
|
2004-02-01 01:39:24 +03:00
|
|
|
.Nd TCP/IP Ident protocol server
|
2004-02-01 00:47:17 +03:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2004-02-01 01:39:24 +03:00
|
|
|
.Op Fl 46beIilNnr
|
2004-02-01 00:47:17 +03:00
|
|
|
.Op Fl a Ar address
|
|
|
|
.Op Fl c Ar charset
|
|
|
|
.Op Fl F Ar format
|
2005-04-04 22:43:55 +04:00
|
|
|
.Op Fl f Ar username
|
2004-02-01 00:47:17 +03:00
|
|
|
.Op Fl g Ar uid
|
|
|
|
.Op Fl L Ar username
|
2005-04-04 02:15:32 +04:00
|
|
|
.Op Fl m Ar filter
|
2004-02-01 00:47:17 +03:00
|
|
|
.Op Fl o Ar osname
|
2005-04-04 02:15:32 +04:00
|
|
|
.Op Fl P Ar address
|
2004-02-01 00:47:17 +03:00
|
|
|
.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:
|
2005-04-04 22:43:55 +04:00
|
|
|
.Bl -tag -width XXusernameXX
|
2004-02-01 00:47:17 +03:00
|
|
|
.It Fl 4
|
2005-04-04 22:43:55 +04:00
|
|
|
Bind to IPv4 addresses only
|
|
|
|
(valid with flag
|
|
|
|
.Fl b ) .
|
2004-02-01 00:47:17 +03:00
|
|
|
.It Fl 6
|
2005-04-04 22:43:55 +04:00
|
|
|
Bind to IPv6 addresses only
|
|
|
|
(valid with flag
|
|
|
|
.Fl b ) .
|
2004-02-01 00:47:17 +03:00
|
|
|
.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
|
2005-04-04 22:43:55 +04:00
|
|
|
will resolve it to an address (or addresses) and will bind this address
|
|
|
|
(valid with flag
|
|
|
|
.Fl b ) .
|
2004-02-01 00:47:17 +03:00
|
|
|
.It Fl b
|
|
|
|
Run in the background (as daemon).
|
|
|
|
.It Fl c Ar charset
|
2005-04-04 22:43:55 +04:00
|
|
|
Specify an optional character set designator to be included in replies.
|
2004-02-01 00:47:17 +03:00
|
|
|
.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
|
2004-02-01 01:39:24 +03:00
|
|
|
error replies.
|
2004-02-01 00:47:17 +03:00
|
|
|
.It Fl F Ar format
|
|
|
|
Specify the format to display info.
|
2002-09-29 18:05:52 +04:00
|
|
|
The allowed format specifiers are:
|
2004-02-01 01:39:24 +03:00
|
|
|
.Bd -literal
|
2004-02-01 00:47:17 +03:00
|
|
|
%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
|
2004-02-01 01:39:24 +03:00
|
|
|
.Ed
|
2004-02-01 00:47:17 +03:00
|
|
|
.Pp
|
1998-07-15 11:31:55 +04:00
|
|
|
The lists of groups (%l, %L) are comma-separated, and start with the primary
|
2002-09-29 18:05:52 +04:00
|
|
|
group which is not repeated.
|
|
|
|
Any other characters (preceded by %, and those not preceded by it)
|
|
|
|
are printed literally.
|
2005-04-04 22:43:55 +04:00
|
|
|
.It Fl f Ar username
|
|
|
|
Specify a fall back
|
|
|
|
.Ar username .
|
2004-02-01 01:39:24 +03:00
|
|
|
If the lookup fails then this username will be returned.
|
2005-04-04 02:15:32 +04:00
|
|
|
This can be useful for when running this service on a NAT host and
|
|
|
|
not using the forward/proxy functionality.
|
2004-02-01 00:47:17 +03:00
|
|
|
.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.
|
2004-02-01 01:39:24 +03:00
|
|
|
.It Fl I
|
|
|
|
Same as
|
|
|
|
.Fl i
|
|
|
|
but without the restriction that the username in
|
|
|
|
.Pa .ident
|
|
|
|
must not match an existing user.
|
2004-02-01 00:47:17 +03:00
|
|
|
.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
|
2004-02-01 01:39:24 +03:00
|
|
|
Specify a
|
2004-02-01 00:47:17 +03:00
|
|
|
.Dq lie
|
|
|
|
.Ar username .
|
2005-04-04 22:43:55 +04:00
|
|
|
.Nm
|
|
|
|
will return this name for all valid ident requests.
|
2004-02-01 01:39:24 +03:00
|
|
|
.It Fl l
|
|
|
|
Use
|
|
|
|
.Xr syslogd 8
|
2005-04-04 22:43:55 +04:00
|
|
|
for logging purposes.
|
2005-04-04 02:15:32 +04:00
|
|
|
.It Fl m Ar filter
|
|
|
|
Enables forwarding of ident queries.
|
|
|
|
The
|
|
|
|
.Ar filter
|
|
|
|
argument specifies which packet filter should be used to lookup the
|
|
|
|
connections, currently
|
2016-12-10 08:43:11 +03:00
|
|
|
.Sq ipfilter ,
|
|
|
|
.Sq npf ,
|
2005-04-04 02:15:32 +04:00
|
|
|
and
|
2016-12-10 08:43:11 +03:00
|
|
|
.Sq pf
|
2005-04-04 02:15:32 +04:00
|
|
|
are supported packet filters.
|
|
|
|
Note that
|
|
|
|
.Nm
|
|
|
|
changes the ident queries to use the local port on the NAT host instead of
|
|
|
|
the local port on the forwarding host.
|
|
|
|
This is needed because otherwise we can't do a lookup on the proxy host.
|
|
|
|
On the proxy host,
|
|
|
|
.Dq proxy mode
|
|
|
|
should be enabled with the
|
|
|
|
.Fl P
|
|
|
|
flag or
|
|
|
|
.Dq lying mode
|
|
|
|
with the
|
|
|
|
.Fl L
|
|
|
|
flag.
|
2004-02-01 00:47:17 +03:00
|
|
|
.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.
|
2004-02-01 01:39:24 +03:00
|
|
|
.It Fl n
|
|
|
|
Return numeric user IDs instead of usernames.
|
2004-02-01 00:47:17 +03:00
|
|
|
.It Fl o Ar osname
|
|
|
|
Return
|
|
|
|
.Ar osname
|
|
|
|
instead of the default
|
|
|
|
.Dq UNIX .
|
2005-04-04 02:15:32 +04:00
|
|
|
.It Fl P Ar address
|
|
|
|
Specify a proxy server which will be used to receive proxied ident
|
|
|
|
queries from.
|
|
|
|
See also the
|
|
|
|
.Fl m
|
|
|
|
flag how this operates.
|
2004-02-01 00:47:17 +03:00
|
|
|
.It Fl p Ar portno
|
2004-02-01 01:39:24 +03:00
|
|
|
Specify an alternative port number under which the server should run.
|
2005-04-04 22:43:55 +04:00
|
|
|
The default is port 113
|
|
|
|
(valid with flag
|
|
|
|
.Fl b ) .
|
2004-02-01 00:47:17 +03:00
|
|
|
.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
|
2004-02-01 01:39:24 +03:00
|
|
|
Specify the user id number or name to which the server should switch after
|
2004-02-01 00:47:17 +03:00
|
|
|
binding itself to the TCP/IP port.
|
|
|
|
.El
|
2004-02-01 01:39:24 +03:00
|
|
|
.Sh FILES
|
|
|
|
.Pa /etc/inetd.conf
|
2004-02-01 00:47:17 +03:00
|
|
|
.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
|
2002-03-28 18:09:14 +03:00
|
|
|
.Pp
|
2005-04-04 22:43:55 +04:00
|
|
|
To run
|
2004-02-01 00:47:17 +03:00
|
|
|
.Nm
|
2005-04-04 22:43:55 +04:00
|
|
|
as standalone daemon, use the
|
2004-02-01 00:47:17 +03:00
|
|
|
.Fl b
|
2005-04-04 22:43:55 +04:00
|
|
|
flag.
|
2004-02-01 00:47:17 +03:00
|
|
|
.Sh SEE ALSO
|
2004-02-01 01:39:24 +03:00
|
|
|
.Xr inetd.conf 5 ,
|
|
|
|
.Xr inetd 8
|
2005-04-04 22:43:55 +04:00
|
|
|
.Sh AUTHORS
|
|
|
|
This implementation of
|
|
|
|
.Nm
|
|
|
|
is written by
|
|
|
|
.An Peter Postma
|
|
|
|
.Aq peter@NetBSD.org .
|
|
|
|
.Sh CAVEATS
|
|
|
|
Since
|
|
|
|
.Nm
|
|
|
|
should typically not be run as a privileged user or group,
|
|
|
|
.Pa .ident
|
|
|
|
files for use when running with the
|
|
|
|
.Fl I
|
|
|
|
or
|
|
|
|
.Fl i
|
|
|
|
flags will need to be world accessible.
|
|
|
|
The same applies for
|
|
|
|
.Pa .noident
|
|
|
|
files when running with the
|
|
|
|
.Fl N
|
|
|
|
flag.
|
|
|
|
.Pp
|
|
|
|
When forwarding is enabled with the
|
|
|
|
.Fl m
|
|
|
|
flag then
|
|
|
|
.Nm
|
|
|
|
will need access to either
|
2016-12-10 08:43:11 +03:00
|
|
|
.Pa /dev/ipnat
|
|
|
|
(ipfilter),
|
|
|
|
.Pa /dev/pf
|
|
|
|
(pf), or
|
2016-12-12 13:07:48 +03:00
|
|
|
.Pa /dev/npf .
|
2005-04-04 22:43:55 +04:00
|
|
|
Since it's not a good idea to run
|
|
|
|
.Nm
|
|
|
|
under root, you'll need to adjust group owner/permissions to the device(s)
|
|
|
|
and run
|
|
|
|
.Nm
|
|
|
|
under that group.
|