man-pages/man1/update-inetd.1.html
2021-03-31 01:06:50 +01:00

278 lines
8.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of UPDATE-INETD</TITLE>
</HEAD><BODY>
<H1>UPDATE-INETD</H1>
Section: User Contributed Perl Documentation (1)<BR>Updated: 2019-03-05<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
update-inetd - create, remove, enable or disable entry /etc/inetd.conf
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>update-inetd</B> [<I>option</I>...] <I>command</I> <I>argument</I>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>update-inetd</B> can be used to add, remove, enable or disable entries in
the <I>/etc/inetd.conf</I> file (you can specify a different file by using the
<B>--file</B> option). After the <I>/etc/inetd.conf</I> file has been changed,
<B>update-inetd</B> will send a <B></B><FONT SIZE="-1"><B>SIGHUP</B></FONT><B></B> signal to the inetd process to make
sure that inetd will use the new <I>/etc/inetd.conf</I> file. For Perl scripts
you can also use the Perl module <B>DebianNet</B>. See <B><A HREF="/cgi-bin/man/man2html?3pm+DebianNet">DebianNet</A></B>(3pm) for
further information. <B>update-inetd</B> can also be used to add entries that
are commented out by default. They will be treated like normal entries.
That also means that if you already have an entry that is commented out you
cannot add an entry for the same service without removing the old one first.
<P>
In accordance with the Debian Policy, <B>update-inetd</B> treats entries that
are prefixed with a single '<B>#</B>' character as commented out by a user. This
means that for a user to disable a service using <B>update-inetd</B>, and for the
service to remain disabled after upgrades, the user must run <B>update-inetd</B>
with <B>--comment-chars '#'</B> (see relevant option below). Conversely, package
maintainer scripts should not override the default comment chars (and when
they do, they must not use '<B>#</B>').
<P>
Also note that <B>--enable</B> and <B>--remove</B> will not be acted upon for service
entries that are commented out using anything but the value specified with
<B>--comment-chars</B> (or the default value if none is specified).
<A NAME="lbAE">&nbsp;</A>
<H2>COMMANDS</H2>
<DL COMPACT>
<DT id="1"><B>--add</B> <I>entry-line</I><DD>
Add an entry to <I>/etc/inetd.conf</I>. A description of the <I>entry-line</I> format
can be found in the <B><A HREF="/cgi-bin/man/man2html?8+inetd">inetd</A></B>(8) or <B><A HREF="/cgi-bin/man/man2html?5+inetd.conf">inetd.conf</A></B>(5) manual pages (or just
look at <I>/etc/inetd.conf</I>). In order to prevent the shell from changing
your <I>entry-line</I> definition you have to quote the <I>entry-line</I> using
single or double quotes. You can use tabs (tab character or \t) and spaces
to separate the fields of the <I>entry-line</I>. To add the <I>entry-line</I> to a
specific section in the <I>/etc/inetd.conf</I> file please use the <B>--group</B>
option.
<P>
If you are trying to add an entry which already exists, <B>update-inetd</B>
will not add the entry. For uncommented entries it will do nothing and
for entries that are commented out by the comment-chars (see option
<B>--comment-chars</B>) it will enable the existing entry. If you want to
completely replace an entry just remove the entry with the <B>--remove</B>
command first.
<DT id="2"><B>--remove</B> <I>entry-regex</I><DD>
Remove an entry-line matching <I>entry-regex</I> (e.g. &quot;<I>telnet</I>&quot;) from
<I>/etc/inetd.conf</I>. The <I>entry-regex</I> will be anchored at the beginning
of the entry line.
<DT id="3"><B>--enable</B> <I>service</I>[,...]<DD>
Enable <I>service</I> (e.g. &quot;<I>ftp</I>&quot;) in <I>/etc/inetd.conf</I>. If you want to
enable more than one <I>service</I> you can use a comma-separated list of
services (no whitespace characters allowed).
<DT id="4"><B>--disable</B> <I>service</I>[,...]<DD>
Disable <I>service</I> (e.g. &quot;<I>ftp</I>&quot;) in <I>/etc/inetd.conf</I>. If you want to
disable more than one <I>service</I> you can use a comma-separated list of
services (no whitespace characters allowed).
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="5"><B>--group</B> <I>groupname</I><DD>
Specify that the new entry should be placed in group <I>groupname</I>
(e.g. &quot;<I></I><FONT SIZE="-1"><I>MAIL</I></FONT><I></I>``). If the group does not exist the entry will be placed
at the end of the file. The default group is ''<B></B><FONT SIZE="-1"><B>OTHER</B></FONT><B></B>&quot;.
<P>
This option is only relevant with the <B>--add</B> command.
<DT id="6"><B>--pattern</B> <I>pattern</I><DD>
This option can be used to select a service. You only need this option if
you have two (or more) services of the same name.
<P>
This option is not relevant with the <B>--add</B> command.
<DT id="7"><B>--comment-chars</B> <I>characters</I><DD>
<B>update-inetd</B> uses &quot;<B>#&lt;off&gt;# </B>&quot; as the default comment characters.
You can use this option to specify different comment characters. This is only
necessary if you have to deal with two (or more) services of the same name.
If you do use this option, it is your responsibility to eventually remove
the commented out entry.
<DT id="8"><B>--multi</B><DD>
If you want to disable/remove more than one entry at a time you should use
this option. If you try to remove more than one entry at a time without
using this option the program will show a warning and prompt the user for
an explicit confirmation.
<DT id="9"><B>--file</B> <I>filename</I><DD>
Use <I>filename</I> instead of <I>/etc/inetd.conf</I>.
<DT id="10"><B>--verbose</B><DD>
Explain what is being done.
<DT id="11"><B>--debug</B><DD>
Enables debugging mode.
<DT id="12"><B>--help</B><DD>
Print a usage message on standard output and exit successfully.
<DT id="13"><B>--version</B><DD>
Print version information on standard output and exit successfully.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>EXAMPLES</H2>
You have installed ssh (secure encrypting remote shell) and wish to
disable its unencrypted cousins:
<P>
<PRE>
update-inetd --comment-chars '#' --disable login,shell,exec,telnet
</PRE>
<P>
Using a single '<B>#</B>' character as a comment-char prevents <B>update-inetd</B>
to re-enable the services on package upgrades.
<P>
You think the clock on your computer is often inaccurate and wish to make
sure other computers cannot read it:
<P>
<PRE>
update-inetd --comment-chars '#' --disable time,daytime
</PRE>
<P>
You get the clock fixed:
<P>
<PRE>
update-inetd --enable time,daytime
</PRE>
<P>
You hear a rumor that inetd is easily crashed via a <FONT SIZE="-1">SYN</FONT> attack against
the time and daytime services, you want to turn off only their <FONT SIZE="-1">TCP</FONT>
versions, while leaving the analogous <FONT SIZE="-1">UDP</FONT> services enabled:
<P>
<PRE>
update-inetd --comment-chars '#' --pattern tcp --disable time,daytime
</PRE>
<P>
You just finished writing a <FONT SIZE="-1">POP3</FONT> server and want to install the
<I>/etc/inetd.conf</I> entry from the Makefile:
<P>
<PRE>
update-inetd --group MAIL --add \
'pop-3\t\tstream\ttcp\tnowait\troot\t/usr/sbin/tcpd\t/usr/sbin/in.pop3d'
</PRE>
<A NAME="lbAH">&nbsp;</A>
<H2>FILES</H2>
<I>/etc/inetd.conf</I>
<I>/var/run/inetd.pid</I>
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?8+inetd">inetd</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?3pm+DebianNet">DebianNet</A></B>(3pm)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="14"><A HREF="#lbAB">NAME</A><DD>
<DT id="15"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="16"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="17"><A HREF="#lbAE">COMMANDS</A><DD>
<DT id="18"><A HREF="#lbAF">OPTIONS</A><DD>
<DT id="19"><A HREF="#lbAG">EXAMPLES</A><DD>
<DT id="20"><A HREF="#lbAH">FILES</A><DD>
<DT id="21"><A HREF="#lbAI">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:29 GMT, March 31, 2021
</BODY>
</HTML>