The actual configuration of inetd is done in /etc/inetd.conf, which has
the following format:
service-name socket-type protocol wait-flag user server-program
Since services are specified in inetd.conf by service name
rather than port, they must be listed in /etc/services in order to be
eligible for handling by inetd.
Let's look at some common lines from /etc/inetd.conf. For example, the
telnet and ftp services:
# grep ^telnet /etc/inetd.conf
telnet stream tcp nowait root /usr/sbin/in.telnetd
# grep ^ftp /etc/inetd.conf
ftp stream tcp nowait root /usr/sbin/in.ftpd -l -a
For both of these services, the configuration is to use the TCP
protocol, and run the server (in.telnetd or
in.ftpd) as the root user. For a complete explanation of
the fields in /etc/inetd.conf, see the inetd(8) man page.