Setting up the inetd configuration file

The inetd program is a generic listener program used by such servers as z/OS UNIX TELNETD and z/OS UNIX REXECD. Other servers such as z/OS UNIX FTPD have their own listener program and do not use inetd.

The inetd.conf file is an example of the user's configuration file. It is stored in the /etc directory. Upon startup, the servers for z/OS UNIX TELNETD, rshell, rlogin, and rexec are initiated if they have been defined in /etc/inetd.conf. If it does not include z/OS UNIX TCP/IP applications, add the information shown in Figure 1:
Figure 1. Adding applications to /etc/inetd.conf
  #======================================================================
  # service | socket | protocol | wait/ | user | server  | server program
  # name    | type   |          | nowait|      | program |   arguments
  #======================================================================
  #
   shell    stream    tcp        nowait  OMVSKERN /usr/sbin/orshd rshd -l  
   exec     stream    tcp        nowait  OMVSKERN /usr/sbin/orexecd rexecd -LV
   otelnet  stream    tcp        nowait  OMVSKERN /usr/sbin/otelnetd otelnetd  -LV
   login    stream    tcp        nowait  bpxroot  /bin/rlogind       rlogind   -d  1 
   # Add the following line to enable Kerberos for orshd
   kshell   stream    tcp        nowait  OMVSKERN /usr/sbin/orshd orshd -l -k KRB5 
Guideline: For IPv6 support, specify tcp6 for the protocol.

When nowait is specified, the inet daemon issues an accept when a connect request is received on a stream socket. You can specify nowait.max, where max is the maximum number of users allowed to request service in a 60–second interval. The default is 40. If maximum is exceeded, the service's port is shut down. If you expect more than 40 users per minute requesting service, specify the maximum that you expect.

To establish a relationship between the servers defined in the /etc/inetd.conf file and specific port numbers in the z/OS UNIX environment, ensure that statements have been added to ETC.SERVICES for each of these servers. See the sample ETC.SERVICES installed in the /usr/lpp/tcpip/samples/services directory for how to specify ETC.SERVICES statements for these servers.

Guideline: It is important that the service name in /etc/inetd.conf (login in  1 ) matches the service name in /etc/services:
login 513/tcp

The traces for both the z/OS UNIX REXECD server and the z/OS UNIX RSHD server are enabled by options in the inetd configuration file (/etc/inetd.conf). See Figure 2.

Figure 2. Setting traces in /etc/inetd.conf
  #======================================================================
  # service | socket | protocol | wait/ | user | server  | server program
  # name    | type   |          | nowait|      | program |   arguments
  #======================================================================
  #
  shell      stream    tcp       nowait OMVSKERN /usr/sbin/orshd rshd -d   2 
  exec       stream    tcp       nowait OMVSKERN /usr/sbin/orexecd rexecd -d   3 
  

The traces are turned on for both servers by passing a -d argument to the server programs.  2  is the RSHD server and  3  is the REXECD server. All commands executed after the debug flags have been turned on in the inetd configuration file and after the inetd server has reread the file produces trace output.

The trace is written in formatted form to the syslogd facility name daemon with a priority of debug. The trace data can be routed to a file in your Hierarchical File System by specifying the following definition in your syslogd configuration file (/etc/syslogd.conf):
  #
  # All ftp, rexecd, rshd
  # debug messages (and above
  # priority messages) go
# to server.debug.a
#
daemon.debug              /tmp/syslogd/server.debug.a
 
 
In this example, the trace data is written to /tmp/syslogd/daemon.debug.a in your hierarchical file system. See z/OS Communications Server: IP Configuration Reference for more information about syslogd.

For more information about inetd, see z/OS UNIX System Services Planning.