xinetd-2.3.12

Introduction to xinetd

xinetd is the eXtended InterNET services Daemon, a secure replacement for inetd.

Package information

Installation of xinetd

Install xinetd by running the following commands:

./configure --prefix=/usr &&
make &&
make install

Command explanations

./configure --prefix=/usr: Change the default installation directory of /usr/local.

Configuring xinetd

Config files

/etc/xinetd.conf

Configuration Information

Create the xinetd.conf file with the following commands:

cp /etc/xinetd.conf /etc/xinetd.conf.bak

Insure the path to all daemons is /usr/sbin, rather than the default path of /usr/etc:

sed -e 's/etc/sbin/g' xinetd/sample.conf > /etc/xinetd.conf

The format of the /etc/xinetd.conf is documented in the xinetd.conf man page. Further information can be found at http://www.xinetd.org.

Create the xinetd boot script:

cat > /etc/rc.d/init.d/xinetd << "EOF"
#!/bin/bash
# Begin $rc_base/init.d/xinetd
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
source /etc/sysconfig/rc
source $rc_functions
case "$1" in
	start)
		echo "Starting xinetd..."
		loadproc /usr/sbin/xinetd
		;;
	stop)
		echo "Stopping xinetd..."
		killproc /usr/sbin/xinetd
		;;
	reload)
		echo "Reloading xinetd..."
		killall -HUP xinetd
		;;
	restart)
		$0 stop
		sleep 1
		$0 start
		;;
	status)
		statusproc /usr/sbin/xinetd
		;;
	*)
		echo "Usage: $0 {start|stop|reload|restart|status}"
		exit 1
		;;
esac
# End $rc_base/init.d/xinetd
EOF
chmod 754 /etc/rc.d/init.d/xinetd

Add the run level symlinks:

ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc0.d/K49xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc1.d/K49xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc2.d/K49xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc3.d/S23xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc4.d/S23xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc5.d/S23xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc6.d/K49xinetd

Now, we'll use our new boot script to start xinetd:

/etc/rc.d/init.d/xinetd start

Checking the /var/log/daemon.log file should prove quite entertaining. This file may contain entries similar to the following:

Aug 22 21:40:21 dps10 xinetd[2696]: Server /usr/sbin/in.rlogind is not
executable [line=29]
Aug 22 21:40:21 dps10 xinetd[2696]: Error parsing attribute server -
DISABLING SERVICE [line=29]
Aug 22 21:40:21 dps10 xinetd[2696]: Server /usr/sbin/in.rshd is not
executable [line=42]

These errors are due to the fact that we don't have most of the servers that xinetd is trying to control installed yet.

Contents

The xinetd package contains xinetd, itox and xconv.pl.

Description

xinetd

xinetd is the Internet services daemon.

itox

itox is a utility used for converting inetd.conf files to xinetd.conf format.

xconv.pl

xconv.pl is a Perl script used for converting inetd.conf files to xinetd.conf format, similar to itox.