1824488 Members
3412 Online
109672 Solutions
New Discussion юеВ

Problems with rexec

 
Esche Markus
Occasional Contributor

Problems with rexec

Hi,
I?ve got a HP K-Class with HP-UX 11.0 OS. A rexec command from a client to the server does not work. I?ve already checked /etc/services, /etc/inetd.conf and /var/adm/inetd.sec, all entries are ok. Even an netstat -a | grep exec say nothing. Does anyone knows an answer??
regards
8 REPLIES 8
Steven Sim Kok Leong
Honored Contributor

Re: Problems with rexec

Hi,

To aid us, can you elaborate on the command you executed and the error message you encountered?

After the following lines are uncommented in /etc/inetd.conf and restrictions set appropriately in /var/adm/inetd.sec, remember to run inetd -c to re-read /etc/inetd.conf:

login stream tcp nowait root /usr/lbin/rlogind rlogind
shell stream tcp nowait root /usr/lbin/remshd remshd
exec stream tcp nowait root /usr/lbin/rexecd rexecd

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Printaporn_1
Esteemed Contributor

Re: Problems with rexec

Hi,

Does remsh work (w/o supply password) ? did you configure $HOME/.rhosts ?
enjoy any little thing in my life
Philip Chan_1
Respected Contributor

Re: Problems with rexec

Hi,

In order to use the rexec service, to the remote machine you have to setup the host equivalent entries via either the $HOME/.rhosts or /etc/host.equiv files. See "man rhosts" for further details. Rexec requests will be served by the rexecd program in the remote side, which will only be waken up while serving requests, therefore you probably won't be able to see its existence by doing "netstat -a|grep exec" at a given time.

Hope this help and explain the situation for you.

Rgds,
Philip
Esche Markus
Occasional Contributor

Re: Problems with rexec

Thanks for all your messages, but i?d already checked all of that.
Here are the errors:

rexec -d hostname "uname"
rexec: Host = hostname
rexec: Command to execute = uname
hostname.mydomain.de: Connection refused
rexec: Error in rexec system call,
rexec: (The following system error may itself be in error)
rexec: Connection refused

rexec -d 10.0.0.1 "uname"
rexec: Host = 10.0.0.1
rexec: Command to execute = uname
10.0.0.1: Connection refused
rexec: Error in rexec system call,
rexec: (The following system error may itself be in error)
rexec: Connection refused
Steven Sim Kok Leong
Honored Contributor

Re: Problems with rexec

Hi,

To identify if it is a server or client problem, try the following because rexecd binds to TCP port 512:

# telnet hostname.mydomain.de 512
# telnet 10.0.0.1 512

If the connections get established, that means that rexecd is running properly on the server and the fault lies with the client rexec.

If the connections do not get established, then it is likely that the server's rexecd is not running or configured properly.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Esche Markus
Occasional Contributor

Re: Problems with rexec

Hi,
I tested the connection with "nc hostname 512" and got no response. On other HP the rexec works with the same configuration.

regs
Philip Chan_1
Respected Contributor

Re: Problems with rexec

Double check your inetd security file, that is the /var/adm/inetd.sec file. Is there any entry related to the "exec" service? Also, check /var/adm/syslog/syslog.log in the remote host to see if there is any exceptions.

~Philip
Steven Sim Kok Leong
Honored Contributor

Re: Problems with rexec

Hi,

If your "telnet hostname.domain 512" does not provide a "Connection established" response, it is likely that at your server end, either rexecd had not been spawned by inetd properly, there was a problem with your rexecd binary or the various configuration files (/etc/services, /etc/inetd.conf, /var/adm/inetd.sec) on your server were not setup properly, despite your initial indication that they were.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com