Operating System - Linux
1820695 Members
2844 Online
109627 Solutions
New Discussion юеВ

rexec does not work in my RedHat 7.1 (2.4.2)

 
Fay_1
Contributor

rexec does not work in my RedHat 7.1 (2.4.2)

I have rsh-server installed, I commented out
auth required /lib/security/pam_securitty.so for both /etc/pam.d/rexec and /etc/pam.d/login. I was trying to login as root. I did ntsysv and verify that rexec is checked. What am I missing? Please help.
2 REPLIES 2
Marco Paganini
Respected Contributor

Re: rexec does not work in my RedHat 7.1 (2.4.2)

Hello Fay

To test, make localhost equivalent to itself:

(as root)
cd /root
echo 127.0.0.1 >>.rhosts
chmod 600 .rhosts

Still as root, try

rlogin localhost

You should see the '#' prompt. If you do not:

1) If it takes a long time before you get an error message, your service may be disabled (check /etc/inetd.conf and see if it's commented out). If that's the case, enable the service and try again.

2) If it just gives you a 'password' prompt (and does not accept your root password), check /var/log/messages for any explanations. If you see a message saying that 'root is not allowed' then you need to comment out the 'pam_securetty' line on your /etc/pam.d/r* files. (I believe you did that already).

In any event, you should seriously consider SSH for this job. RSH is a gaping security hole and should not be relied upon.

Regards,
Paga
Keeping alive, until I die.
Mark Fenton
Esteemed Contributor

Re: rexec does not work in my RedHat 7.1 (2.4.2)

Check /etc/xinetd.d/rsh

By default, the service is disabled, like so:
[root@redhat xinetd.d]# cat rsh
# default: off
# description: The rshd server is the 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
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rshd
disable = yes
}
[root@redhat xinetd.d]#

change the yes in that last line to no, and try again.

Best Regards.