update-inetd
Update inetd configuration file
SYNOPSIS
update-inetd [OPTIONS] {--enable|--disable|--remove|--install|--query} SERVICE [ARGS...]
update-inetd [OPTIONS] --inetdconf FILE
PARAMETERS
--enable SERVICE...
Enables one or more specified network services by uncommenting their entries in /etc/inetd.conf.
--disable SERVICE...
Disables one or more specified network services by commenting out their entries in /etc/inetd.conf.
--remove SERVICE...
Removes one or more specified network services completely from the configuration file.
--install SERVICE ARGS...
Installs a new network service definition. SERVICE is the service name, and ARGS are the `inetd.conf` fields (e.g., `stream tcp nowait root /usr/sbin/in.telnetd telnetd`).
--query SERVICE
Checks and reports the current status (enabled/disabled/not found) of the specified service.
--verbose
Increases the verbosity of the output, providing more detailed information about the operations being performed.
--quiet
Suppresses most output, showing only critical errors.
--inetdconf FILE
Specifies an alternative `inetd.conf` file to operate on instead of the default /etc/inetd.conf.
--pattern REGEX
Used with --remove, allows removing services matching a Perl-compatible regular expression.
--class CLASS
When installing a service, assigns it to a logical class, which can be used for later management.
--group GROUP
When installing a service, assigns it to a logical group, similar to class.
--local-only
Processes only service definitions marked as 'local' (i.e., not installed by system packages).
--system-only
Processes only service definitions marked as 'system' (i.e., installed by system packages).
--no-restart
Prevents update-inetd from attempting to restart the `inetd` daemon after making configuration changes.
--help
Displays a help message with command usage and options.
--version
Displays the version information of the update-inetd utility.
DESCRIPTION
The update-inetd command is a utility designed to manage entries within the /etc/inetd.conf configuration file, which is used by the `inetd` (or `openbsd-inetd`) super-server daemon. This tool provides a standardized way to enable, disable, install, or remove network service definitions. Traditionally, `inetd` listens on specific network ports and, upon receiving a connection, launches the appropriate server program (e.g., FTP, Telnet, or custom services).
update-inetd streamlines the process of modifying this critical configuration file, particularly in automated environments like package installations or removals. Instead of directly editing /etc/inetd.conf, which can be error-prone, administrators and package maintainers can use update-inetd to ensure consistency and prevent conflicts. It intelligently comments out or uncomments service lines, or adds/removes full definitions. After making changes, it typically triggers a restart of the `inetd` daemon to apply the new configuration, unless explicitly told not to. While `inetd` is less commonly used for many services today compared to `xinetd` or standalone daemons, update-inetd remains relevant for systems still utilizing the `inetd` super-server.
CAVEATS
While update-inetd effectively manages /etc/inetd.conf, it's important to note that the `inetd` super-server itself is less commonly used in modern Linux distributions compared to `xinetd` or dedicated standalone daemons. Many services have moved away from `inetd` for performance, security, and flexibility reasons. Enabling services via `inetd` can pose security risks if not properly configured, as it makes network services accessible. Furthermore, `update-inetd` requires root privileges to modify /etc/inetd.conf and restart the `inetd` daemon. Changes made by this command typically require a restart of the `inetd` daemon to take effect, which update-inetd attempts by default unless --no-restart is specified.
SERVICE DEFINITION FORMAT FOR --INSTALL
When using the --install option, the ARGS provided must follow the standard `inetd.conf` service definition format. This typically includes fields such as service_name, socket_type, protocol, wait_status, user, server_program, and server_program_arguments. For example: `echo stream tcp nowait root internal`. It's crucial to correctly specify these fields for the service to function properly.
RESTARTING THE INETD DAEMON
For changes made by update-inetd to take effect, the `inetd` daemon (or `openbsd-inetd`) must be reloaded or restarted. By default, update-inetd attempts to do this automatically after modifying /etc/inetd.conf. If the daemon fails to restart or if the --no-restart option was used, administrators must manually restart it using a command like `service openbsd-inetd restart` or `systemctl restart openbsd-inetd.service` to apply the new configuration.
HISTORY
The update-inetd utility is part of the `debianutils` package and has been primarily used in Debian-based Linux distributions. Its development is closely tied to the Debian packaging system, providing a robust mechanism for packages to configure network services that rely on the `inetd` super-server during installation and removal. Its usage peaked when `inetd` was a more central component of network service management. With the widespread adoption of `xinetd` and later `systemd` in many distributions, the direct relevance and frequency of use for `inetd` and `update-inetd` have gradually diminished, though it remains a vital tool for legacy systems or specific service configurations.
SEE ALSO
inetd(8), inetd.conf(5), xinetd(8), update-rc.d(8), systemctl(1)