LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mageia (https://www.linuxquestions.org/questions/mageia-97/)
-   -   enable telnet server in Mageia (https://www.linuxquestions.org/questions/mageia-97/enable-telnet-server-in-mageia-4175650591/)

mrmazda 03-20-2019 10:11 PM

enable telnet server in Mageia
 
Please do not mention the subject of security or insecurity here. It will be ignored.

The only comment I've ever found about $SUBJECT is a warning when installing netkit-telnet-server that the admin must configure its use manually, which managed to escape logging and my memory. There seems to be no documentation about making telnet server operable on Mageia, and no clues from man or journalctl or systemctl about it. On Fedora and openSUSE it can be configured by enabling telnetd.socket and xinetd, but apparently this configuration is installed on those distros, so only needs enabling, not figuring out to set up whatever is required or where documentation to do so is squirreled away for Mageia's differently named rpms. Can someone please tell me how to enable telnet server in Mageia 6 and/or 7, or provide clues to documentation for same?

wpeckham 03-21-2019 06:21 AM

Question: why would anyone, in 2019, want to enable TELNET server (a product of 1969) anywhere, when there have been better solutions since 1995?

michaelk 03-21-2019 07:55 AM

For whatever reason you need to run a telnet server. xinetd is installed by default on version 6 so.

Have you changed disable = yes to disable = no in the the /etc/xinetd.d/telnet configuration file?
Have you enabled / started xinetd via the systemctl command?

mrmazda 04-01-2019 05:54 AM

On a Cauldon installation on host fi965 there is no "disable" or "enable" in /etc/xinetd.d/telnet, because /etc/xinetd.d/telnet does not exist.
Code:

# systemctl status telnet.d
â xinetd.service - Xinetd A Powerful Replacement For Inetd
  Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled; vendor preset: enabled)
  Active: active (running) since Mon 2019-04-01 06:06:59 EDT; 17min ago
    Docs: man:xinetd
          man:xinetd.conf
          man:xinetd.log
 Main PID: 1405 (xinetd)
  Memory: 1.1M
  CGroup: /system.slice/xinetd.service
          ââ1405 /usr/sbin/xinetd -stayalive -dontfork

Apr 01 06:06:59 big41 xinetd[1405]: Reading included configuration file: /etc/xinetd.d/servers [file=/etc/xinetd.d/servers] [line=15]
Apr 01 06:06:59 big41 xinetd[1405]: Reading included configuration file: /etc/xinetd.d/services [file=/etc/xinetd.d/services] [line=13]
Apr 01 06:06:59 big41 xinetd[1405]: Reading included configuration file: /etc/xinetd.d/telnet [file=/etc/xinetd.d/telnet] [line=13]
Apr 01 06:06:59 big41 xinetd[1405]: Server /usr/sbin/in.telnetd is not executable [file=/etc/xinetd.d/telnet] [line=12]
Apr 01 06:06:59 big41 xinetd[1405]: Error parsing attribute server - DISABLING SERVICE [file=/etc/xinetd.d/telnet] [line=12]
Apr 01 06:06:59 big41 xinetd[1405]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=13]
Apr 01 06:06:59 big41 xinetd[1405]: Reading included configuration file: /etc/xinetd.d/time-udp [file=/etc/xinetd.d/time-udp] [line=14]
Apr 01 06:06:59 big41 xinetd[1405]: removing telnet
Apr 01 06:06:59 big41 xinetd[1405]: 2.3.15.4 started with libwrap loadavg options compiled in.
Apr 01 06:06:59 big41 xinetd[1405]: Started working: 0 available services

Code:

# systemctl status xinetd
â xinetd.service - Xinetd A Powerful Replacement For Inetd
  Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled; vendor preset: enabled)
  Active: active (running) since Mon 2019-04-01 06:06:59 EDT; 33min ago
    Docs: man:xinetd
          man:xinetd.conf
          man:xinetd.log
 Main PID: 1405 (xinetd)
  Memory: 1.1M
  CGroup: /system.slice/xinetd.service
          ââ1405 /usr/sbin/xinetd -stayalive -dontfork

Apr 01 06:06:59 big41 xinetd[1405]: Reading included configuration file: /etc/xinetd.d/servers [file=/etc/xinetd.d/servers] [line=15]
Apr 01 06:06:59 big41 xinetd[1405]: Reading included configuration file: /etc/xinetd.d/services [file=/etc/xinetd.d/services] [line=13]
Apr 01 06:06:59 big41 xinetd[1405]: Reading included configuration file: /etc/xinetd.d/telnet [file=/etc/xinetd.d/telnet] [line=13]
Apr 01 06:06:59 big41 xinetd[1405]: Server /usr/sbin/in.telnetd is not executable [file=/etc/xinetd.d/telnet] [line=12]
Apr 01 06:06:59 big41 xinetd[1405]: Error parsing attribute server - DISABLING SERVICE [file=/etc/xinetd.d/telnet] [line=12]
Apr 01 06:06:59 big41 xinetd[1405]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=13]
Apr 01 06:06:59 big41 xinetd[1405]: Reading included configuration file: /etc/xinetd.d/time-udp [file=/etc/xinetd.d/time-udp] [line=14]
Apr 01 06:06:59 big41 xinetd[1405]: removing telnet
Apr 01 06:06:59 big41 xinetd[1405]: 2.3.15.4 started with libwrap loadavg options compiled in.
Apr 01 06:06:59 big41 xinetd[1405]: Started working: 0 available services

Code:

# rpm -qa | grep telnet
netkit-telnet-0.17-18.mga7
netkit-telnet-server-0.17-18.mga7


sevendogsbsd 04-01-2019 10:22 AM

Quote:

Originally Posted by wpeckham (Post 5976169)
Question: why would anyone, in 2019, want to enable TELNET server (a product of 1969) anywhere, when there have been better solutions since 1995?

Because some folks have no idea that telnet sends everything in the clear, or that even doing that is bad security practice. Also, some folks go for "easy" instead of secure because they don't understand the implications of what they do. Sad but keeps security professionals such as myself in business...

pan64 04-01-2019 01:26 PM

Quote:

Error parsing attribute server - DISABLING SERVICE [file=/etc/xinetd.d/telnet] [line=12]
this file is incorrect. You need to fix it. But I don't know what is the content.
http://www.linuxhomenetworking.com/w...TP,_and_xinetd

mrmazda 04-01-2019 03:10 PM

Quote:

Originally Posted by pan64 (Post 5980130)
this file is incorrect. You need to fix it. But I don't know what is the content.
http://www.linuxhomenetworking.com/w...TP,_and_xinetd

Unlike openSUSE or other distros here installed, Mageia provides packages named neither telnet nor telnetd. What it does provide are:
Code:

lib64telnet2
lib64telnet-devel
libtelnet-utils
netkit-telnet
netkit-telnet-server
perl-IO-Socket-Telnet
perl-Net-Telnet
perl-Net-Telnet-Cisco
ruby-net-telnet

Man pages for neither netkit-telnet nor netkit-telnet-server exist.
Code:

â xinetd.service - Xinetd A Powerful Replacement For Inetd
  Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled; vendor preset: enabled)
  Active: active (running) since Mon 2019-04-01 15:39:58 EDT; 6min ago
    Docs: man:xinetd
          man:xinetd.conf
          man:xinetd.log
 Main PID: 1405 (xinetd)
  Memory: 1.1M
  CGroup: /system.slice/xinetd.service
          ââ1405 /usr/sbin/xinetd -stayalive -dontfork

xinetd[1405]: Reading included configuration file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=15]
xinetd[1405]: Reading included configuration file: /etc/xinetd.d/discard-udp [file=/etc/xinetd.d/discard-udp] [line=13]
xinetd[1405]: Reading included configuration file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo] [line=14]
xinetd[1405]: Reading included configuration file: /etc/xinetd.d/echo-udp [file=/etc/xinetd.d/echo-udp] [line=14]
xinetd[1405]: Reading included configuration file: /etc/xinetd.d/servers [file=/etc/xinetd.d/servers] [line=15]
xinetd[1405]: Reading included configuration file: /etc/xinetd.d/services [file=/etc/xinetd.d/services] [line=13]
xinetd[1405]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=13]
xinetd[1405]: Reading included configuration file: /etc/xinetd.d/time-udp [file=/etc/xinetd.d/time-udp] [line=14]
xinetd[1405]: 2.3.15.4 started with libwrap loadavg options compiled in.
xinetd[1405]: Started working: 0 available services

I created /etc/xinet.d/telnet containing:
Code:

# default: off
# description: Telnet is the old login server which is INSECURE and should \
#        therefore not be used. Use secure shell (openssh).
#        If you need telnetd not to "keep-alives" (e.g. if it runs over a ISDN \
#        uplink), add "-n".  See 'man telnetd' for more details.
service telnet
{
        socket_type        = stream
        protocol        = tcp
        wait                = no
        user                = root
        server                = /usr/sbin/telnetd
}

This enabled a connection to provide a login prompt, but the password got rejected. I think this is because /etc/securetty requires something that is absent. OK, I checked a Debian's /etc/securetty, added pts/0, pts/1 & pts/2 to Cauldron's, and now it's working.

Thanks to michaelk and pan64! :)


All times are GMT -5. The time now is 11:50 AM.