3

inetd is a service dispatcher for services recorded in /etc/inetd.conf.

In Lubuntu 18.04, there is no /etc/inetd.conf. ps -A | grep inetd returns nothing. What are the replacements of inetd and /etc/inetd.conf?

I do not have /etc/xinetd*.

Thanks.

Tim
  • 98,580
  • 191
  • 570
  • 977
  • 1
    Does Lubuntu use systemd? If so, see http://0pointer.de/blog/projects/inetd.html – Ed Grimm Feb 14 '19 at 01:30
  • Yeah, `systemd` provides yet another alternative over the old style `inetd` and `xinetd`. But `xinetd` still works, for backwards compatibility. – Stephen Harris Feb 14 '19 at 01:44
  • The replacement to inetd is ... inetd. You just have to install it, if it's not installed by default (a quick search show packages like openbsd-inetd, inetutils-inetd, xinetd, etc). inetd is not some mandatory component because many systems don't need it (most services -- sshd, samba, ... can do their own listening and forking). –  Feb 14 '19 at 07:13

1 Answers1

3

Many Linux's use xinetd and so the file is /etc/xinetd.conf. However, it's normally better to put services into files in /etc/xinetd.d

e.g. the file /etc/xinetd.d/time may contain

# This is the tcp version.
service time
{
        disable         = yes
        type            = INTERNAL
        id              = time-stream
        socket_type     = stream
        protocol        = tcp
        user            = root
        wait            = no
}

# This is the udp version.
service time
{
        disable         = yes
        type            = INTERNAL
        id              = time-dgram
        socket_type     = dgram
        protocol        = udp
        user            = root
        wait            = yes
}

On my machine I have an nntp entry for leafnode:

% cat /etc/xinetd.d/nntp 
service nntp
{
        disable = no
        socket_type     = stream
        wait            = no
        user            = news
        flags           = IPv6
        server          = /usr/local/leafnode/sbin/leafnode
}

If xinetd isn't installed then you can just install it; eg sudo apt-get install xinetd

Stephen Harris
  • 42,369
  • 5
  • 94
  • 123
  • What is your system? – clearlight Apr 26 '20 at 03:14
  • 1
    `xinetd` is available in RedHat 6, 7, 8 (and so CentOS and other rebuilds); in Debian 9, 10 (and so likely in most downstream derivatives). – Stephen Harris Apr 26 '20 at 18:17
  • Thanks. I actually downloaded inetdutils-inetd package fro Debian 10 for easy conformance with the 'netperf' utility, whose manual documents an inetd entry, as it was initially a project based on HP-UX. Worked seamlessly (except I still have to manually start the service :-) But that's just laziness. – clearlight Apr 27 '20 at 12:18