0
[ 2 root ] $ cat /etc/securetty
#
# This file contains the device names of tty lines (one per line,
# without leading /dev/) on which root is allowed to login.
#
tty1
tty2
tty3
tty4
tty5
tty6
rsh
rlogin
rexec
[ 3 root ] $ cat /etc/xinetd.d/rsh
# default: off
# description:
# The rshd server is a server for the rcmd(3) routine and,
# consequently, for the rsh(1) program. The server provides
# remote execution facilities with authentication based on
# privileged port numbers from trusted hosts.
#
service shell
{
        socket_type     = stream
        protocol        = tcp
        flags           = NAMEINARGS
        wait            = no
        user            = root
        group           = root
        log_on_success  += USERID
        log_on_failure  += USERID
        server          = /usr/sbin/tcpd
#       server_args     = /usr/sbin/in.rshd -L
        server_args     = /usr/sbin/in.rshd -aL
        disable         = no
}
[ 4 root ] $ cat /etc/xinetd.d/rlogin
# default: off
# description:
# Rlogind is a server for the rlogin program. The server provides remote
# execution with authentication based on privileged port numbers from trusted
# host
#
service login
{
        socket_type     = stream
        protocol        = tcp
        flags           = NAMEINARGS
        wait            = no
        user            = root
        group           = root
        log_on_success  += USERID
        log_on_failure  += USERID
        server          = /usr/sbin/tcpd
        server_args     = /usr/sbin/in.rlogind
#       server_args     = /usr/sbin/in.rlogind -a
        disable         = no
}

Issue is here:

XXXXXXX2003:db2pb1 51> rsh XXXXXX2001
Local Password: /*Eventhough it's empty password phrase, but it shouldn't prompt*/
Last login: Tue Mar  2 16:23:06 from 
Directory: /db2/db2pb1
Tue Mar  2 16:23:06 UTC 2021

At the beginning it wasn't working even though, as i have copied the below three files to successfully implement the rsh login.

db2pb1 51> ll /usr/sbin/in.rexecd
-rwxr-xr-x 1 root root 15136 Mar  2 11:30 /usr/sbin/in.rexecd
-rwxr-xr-x 1 root root 23512 Mar  2 11:30 /usr/sbin/in.rlogind
-rwxr-xr-x 1 root root 23840 Mar  2 11:30 /usr/sbin/in.rshd
Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • 2
    I admittedly don't know about the question, but I'll just state the obvious: you really ought to use ssh. It both provides security and is what people know how to set up these days. – Håkan Lindqvist Mar 02 '21 at 17:07
  • You can login without password using an `rhosts` file on the server. In your case, the servers have different `rhosts` files. Fun fact: While researching this, I found the following gem on the `rlogin` man page: "*Rlogin will be replaced by telnet(1) in the near future*". I think this is all there needs to be said about `rlogin` and friends. They are so ready for retirement. – berndbausch Mar 02 '21 at 23:54

1 Answers1

0

I got this issue resolved after copying the pam.d file for the rsh & rlogin from another system which was working. Got the issue fixed.