HP-UX Reference (11i v1 05/09) - 1M System Administration Commands A-M (vol 3)

i
inetd(1M) inetd(1M)
NAME
inetd - Internet services daemon
SYNOPSIS
/usr/sbin/inetd
[-c]
/usr/sbin/inetd
[-k]
/usr/sbin/inetd
[-l]
/usr/sbin/inetd
[-s]
DESCRIPTION
The
inetd daemon is the Internet superserver, which invokes Internet server processes as needed. It
must be running before other hosts can connect to the local host through
ftp, rcp, remsh, rlogin, and
telnet. The inetd daemon also supports services based on the Remote Procedure Call (RPC) protocol
(NFS), such as rwalld and rusersd. If RPC servers are started by
inetd, the portmap server (see
portmap(1M)) must be started before
inetd
.
The
inetd daemon is designed to invoke all the Internet servers as needed, thus reducing load on the sys-
tem. It is normally started at system boot time. Only one inetd can run at any given time.
The inetd daemon starts servers for both stream and datagram type services. For stream services,
inetd listens for connection requests on Internet stream sockets. When a connection is requested for one
of its sockets, inetd decides which service the socket will support, forks a process, invokes an appropriate
server for the connection, and passes the connected socket to the server as stdin and stdout. Then
inetd returns to listening for connection requests.
For datagram services, inetd waits for activity on Internet datagram sockets. When an incoming
datagram is detected, inetd forks a process, invokes an appropriate server, and passes the socket to the
server as stdin and stdout. Then inetd waits, ignoring activity on that datagram socket, until the
server exits.
The inetd daemon is normally started by the /sbin/init.d/inetd
script, which is invoked during
the boot-time initialization. Otherwise,
inetd can be started only by the superuser.
The Internet daemon and the servers it starts inherit the
LANG and TZ environment variables and the
umask of the process that started inetd.Ifinetd is started by the superuser, it inherits the
superuser’s umask, and passes that umask to the servers it starts.
NOTE : Services currently supported by inetd will work in an IPv6 environment with a few changes to
the configuration file /etc/inetd.conf
. (See inetd.conf(4)). When invoked, inetd reads
/etc/inetd.conf and configures itself to support whatever services are included in that file (see
inetd.conf(4)). The
inetd daemon also performs a security check if the file /var/adm/inetd.sec
exists (see inetd.sec(4)). If the Internet daemon refuses a connection for security reasons, the connection is
shut down. Most RPC-based services, if their first connection is refused, attempt to connect four more
times at 5-second intervals before timing out. In such cases, inetd refuses the connection from the same
service invocation five times. This is visible in the system log if inetd connection logging and
syslogd
logging for the daemon facility are both enabled (see syslogd(1M)).
The inetd daemon provides several "trivial" services internally by use of routines within itself. The ser-
vices are echo, discard, chargen (character generator), daytime (human readable time), and time
(machine readable time in the form of the number of seconds since midnight, January 1, 1900). The
inetd daemon provides both TCP- and UDP-based servers for each of these services. See inetd.conf(4) for
instructions on configuring internal servers.
Options
inetd recognizes the following options. These options can be used only by a superuser.
-c Reconfigure the Internet daemon; in other words, force the current inetd to reread
/etc/inetd.conf. This option sends the signal SIGHUP to the Internet daemon that is
currently running. Any configuration errors that occur during the reconfiguration are logged to
the syslogd daemon facility.
-k Kill the current inetd. This option sends the signal SIGTERM to the Internet daemon that is
currently running, causing it to exit gracefully. This option is the preferred method of killing
inetd.
HP-UX 11i Version 1: September 2005 1 Hewlett-Packard Company Section 1M351