|
|
1.1 root 1: .\" Copyright (c) 1985 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)inetd.8 6.4 (Berkeley) 5/26/86
6: .\"
7: .TH INETD 8 "May 26, 1986"
8: .UC 6
9: .SH NAME
10: inetd \- internet ``super\-server''
11: .SH SYNOPSIS
12: .B /etc/inetd
13: [
14: .B \-d
15: ] [ configuration file ]
16: .SH DESCRIPTION
17: .I Inetd
18: should be run at boot time by
19: .IR /etc/rc.local .
20: It then listens for connections on certain
21: internet sockets. When a connection is found on one
22: of its sockets, it decides what service the socket
23: corresponds to, and invokes a program to service the request.
24: After the program is
25: finished, it continues to listen on the socket (except in some cases which
26: will be described below). Essentially,
27: .I inetd
28: allows running one daemon to invoke several others,
29: reducing load on the system.
30: .PP
31: Upon execution,
32: .I inetd
33: reads its configuration information from a configuration
34: file which, by default, is
35: .IR /etc/inetd.conf .
36: There must be an entry for each field of the configuration
37: file, with entries for each field separated by a tab or
38: a space. Comments are denoted by a ``#'' at the beginning
39: of a line. There must be an entry for each field. The
40: fields of the configuration file are as follows:
41: .br
42: service name
43: .br
44: socket type
45: .br
46: protocol
47: .br
48: wait/nowait
49: .br
50: user
51: .br
52: server program
53: .br
54: server program arguments
55: .PP
56: The
57: .I service name
58: entry is the name of a valid service in
59: the file
60: .IR /etc/services/ .
61: For ``internal'' services (discussed below), the service
62: name
63: .I must
64: be the official name of the service (that is, the first entry in
65: .IR /etc/services ).
66: .PP
67: The
68: .I socket type
69: should be one of ``stream'', ``dgram'', ``raw'', ``rdm'', or ``seqpacket'',
70: depending on whether the socket is a stream, datagram, raw,
71: reliably delivered message, or sequenced packet socket.
72: .PP
73: The
74: .I protocol
75: must be a valid protocol as given in
76: .IR /etc/protocols .
77: Examples might be ``tcp'' or ``udp''.
78: .PP
79: The
80: .I wait/nowait
81: entry is applicable to datagram sockets only (other sockets should
82: have a ``nowait'' entry in this space). If a datagram server connects
83: to its peer, freeing the socket so
84: .I inetd
85: can received further messages on the socket, it is said to be
86: a ``multi-threaded'' server, and should use the ``nowait''
87: entry. For datagram servers which process all incoming datagrams
88: on a socket and eventually time out, the server is said to be
89: ``single-threaded'' and should use a ``wait'' entry. ``Comsat'' (``biff'')
90: and ``talk'' are both examples of the latter type of
91: datagram server.
92: .I Tftpd
93: is an exception; it is a datagram server that establishes pseudo-connections.
94: It must be listed as ``wait'' in order to avoid a race;
95: the server reads the first packet, creates a new socket,
96: and then forks and exits to allow
97: .I inetd
98: to check for new service requests to spawn new servers.
99: .PP
100: The
101: .I user
102: entry should contain the user name of the user as whom the server
103: should run. This allows for servers to be given less permission
104: than root.
105: The
106: .I server program
107: entry should contain the pathname of the program which is to be
108: executed by
109: .I inetd
110: when a request is found on its socket. If
111: .I inetd
112: provides this service internally, this entry should
113: be ``internal''.
114: .PP
115: The arguments to the server program should be just as they
116: normally are, starting with argv[0], which is the name of
117: the program. If the service is provided internally, the
118: word ``internal'' should take the place of this entry.
119: .PP
120: .I Inetd
121: provides several ``trivial'' services internally by use of
122: routines within itself. These services are ``echo'',
123: ``discard'', ``chargen'' (character generator), ``daytime''
124: (human readable time), and ``time'' (machine readable time,
125: in the form of the number of seconds since midnight, January
126: 1, 1900). All of these services are tcp based. For
127: details of these services, consult the appropriate RFC
128: from the Network Information Center.
129: .PP
130: .I Inetd
131: rereads its configuration file when it receives a hangup signal, SIGHUP.
132: Services may be added, deleted or modified when the configuration file
133: is reread.
134: .SH "SEE ALSO"
135: comsat(8C), ftpd(8C), rexecd(8C), rlogind(8C), rshd(8C),
136: telnetd(8C), tftpd(8C)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.