1833750 Members
2672 Online
110063 Solutions
New Discussion

rexec from Windoze

 
SOLVED
Go to solution
Ron D.
Frequent Advisor

rexec from Windoze

I am trying to gather iostat information from a Windows client using rexec. The command line looks like this:
rexec servera "iostat 1 2 |grep c6t0d2 |cut -c 12-17|grep -v 0"

This should give me the bps rate for the device 'c6t0d2' which I can then graph in MRTG.

The problem seems to be authentication with the Windoze version of rexec? I created a .netrc file on servera without luck. The file is located in '/' and contains the following:
machine #####.###.### login ### password ###


Is the format correct? Based on what I have seen it looks right. I am currently using .netrc for other hosts that seem to work, but they are not windoze based. I would also like to stay away from using .rhosts for security reasons.

On a side note, is there a better way to get the information out of iostat and/or sar to be graphed on my Windoze-based MRTG system? I am specifically looking to expand this by gathering disk information from 2 disks including all sar and iostat data.

Thanks
7 REPLIES 7
Sridhar Bhaskarla
Honored Contributor

Re: rexec from Windoze

Hi,

.netrc will have no effect on rexec. It's for ftp.

rexec will prompt for the password. All r-commands usually packaged together so use remsh. Since iostat can be run as an ordinary user, setup .rhosts account for an user and use "remsh" on the window client to connect to the unix box.

Look at remsh man page for more options.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ron D.
Frequent Advisor

Re: rexec from Windoze

The documentation on rexec seem to differ, suggesting that .netrc can be used with rexec. Or am I reading it wrong?
http://docs.hp.com/cgi-bin/onlinedocs.py?mpn=B2355-90683&service=hpux&path=../B2355-90683/00/04/490&title=HP-UX%20Reference%20Volume%204%3A%20Section%203
Ron D.
Frequent Advisor

Re: rexec from Windoze

One more ting I forgot to mention. I have duplicated the .netrc file in the user's home directory and set the acl to 700 with not luck either.
Sridhar Bhaskarla
Honored Contributor
Solution

Re: rexec from Windoze

You are right and I need to back out on .netrc. But it is to be created on the localhost so that it reads the login and password information from it. Looks like you are trying to create it on the remote host which will be of no use.

So, you have to create it on your PC. You may have to check the documentation of your r-comands packages to see in which directory it looks for .netrc.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ron D.
Frequent Advisor

Re: rexec from Windoze

That would seem to make sense, now I need to dig to find out where M$ locates it.
Spörk Knud
New Member

Re: rexec from Windoze

Hi Ron

I know, its a very old issue but how have you solved the problem?
I have the same, and i'm looking for an answere.

thx
Knud
Ron D.
Frequent Advisor

Re: rexec from Windoze

Yeah, that was a long time ago; I'm on my third job title change so this might be a stretch but I'll see what I can do.

I was able to resolve the problem in testing by ensuring that I was logged in as the same user on the local machine as the remote machine was expecting. Passwords had to match as well. Beyond that I don't recall anything too strange about the configuration. I do recall getting some Windows-specific help from somewhere on the 'net but have no idea where it came from. I suspect that Goggle or another search engine would be able to provide some answers for you there.

Good luck.