Hi,
I am trying to enable rexec to automate certain tasks(it has to be rexec, not ssh or any other due to the system environment), so after switching to linux, I followed the certain instructions that were laid out in the web.
My operating system is fedora 17, so I first installed the rsh-server.i686 package(which includes rexec), enabled it from /etc/xinetd.d/rexec by changing it as the following :
# default: off
# description: Rexecd is the server for the rexec(3) routine. The server \
# provides remote execution facilities with authentication based \
# on user names and passwords.
service exec
{
socket_type = stream
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rexecd
disable = no
}
I also edited /etc/pam.d/rexec and commented out the nologin line like this :
#%PAM-1.0
# For root login to succeed here with pam_securetty, "rexec" must be
# listed in /etc/securetty.
#auth required pam_nologin.so
auth required pam_securetty.so
auth required pam_env.so
auth include password-auth
auth sufficient pam_rhosts.so
account include password-auth
session optional pam_keyinit.so force revoke
session required pam_loginuid.so
session include password-auth
I've added + + in the .rhosts file for each user and also the /etc/hosts.equiv file(which will later be replaced by hostname/user, but for now, + + for testing purposes).
I also added rexec in /etc/securetty. Then I restarted xinetd. Just in case, I temporarily disabled SELinux and iptables also so nothing will get in the way.
I believe I followed all the right procedures in order to get rexec working, but when I issue the command, it seems to work but the output is plain blank :
[root@localhost test]# rexec -lusername -ppassword -d 192.168.206.134 id
rexec: Host = 192.168.206.134
rexec: Command to execute = id
The reason why I think it's partially working is because there is no delay when executing the command, and there is no error message.
But the result does not seem to output back to the host.
The port 512 is listening so the rexecd daemon seems to be working fine.
Does any know how to fix this?
Thanks!