RSH use for executing a script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting RSH use for executing a script
# 1  
Old 10-01-2003
Data RSH use for executing a script

I have a script on one server.. which I am trying to run remotely from another server using rsh....

The command that i use from my second server is as follows

rsh /user_name="ops" /password="ops1" server1 "cd /users/ops ; ./script1"


When I run this I receive an error containing the below errors:
grc_error() says: GRC file /users/ops/.ops.rc open failed: No such file or directory (result 3)

I can run the script with no problems on server1 but when I try remotely from another server using rsh I receive the error above.. Any help would be appreciated - Anyone know what this file is or needs to contain??
# 2  
Old 10-01-2003
The syntax on your rsh command is very odd. What versions of unix are running on these systems?

If server1 works like versions of unix that I know, I may have an idea. Sign on to it and type env to see your environment. Then run an rsh command with just "env". I'll bet that your script needs an environment variable set. I would figure out which one and set it in the script.
# 3  
Old 10-01-2003
I am running the rsh command from an openvms system to a unix alpha system.

I hadnt checked the env variables yet but I will do so now...
Any idea what variable it could be?
# 4  
Old 10-01-2003
No idea about which variable. Just clobber them one by one until it fails.

openvms supports rsh?! Now that is interesting....
# 5  
Old 10-01-2003
Well, I posted that your DCL may in the wrong order, but then I jumped on a free VMS account and looked further - it should be fine.

Follow Perderabo's suggestion.

Last edited by RTM; 10-01-2003 at 02:45 PM..
# 6  
Old 10-02-2003
A lot of variables, so I am going through one by one.. I will let you know...



I am using openvms 7.3-1 and it supports rsh no problem... and I am pretty sure anything from at least 7.2 up does, not sure to prior to those versions.
# 7  
Old 10-02-2003
Can the author of the script provide any guidance? There should be some documentation, even if it is only in comments inside the script.

This page seems to suggest that a perl module named named getrc might need RC_PATH. Could that be it?

And understand that once you get past this error, you could encounter another error generated by a missing environment variable. You can eventually find them all by trial and error. But someone who understands the tools being used by the script can probably find them all in a few seconds.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Problem on rsh to run script

Hi, i want to run a touch_file_script.sh on host2 by rsh -ing from host1 to host 2 <host1># rsh <host2> <path>/touch_file_script.sh No error was prompt. However it did not create the file as in the script. # rsh <host2> # sh -x <path>/touch_file_script.sh + touch <file> Run it... (1 Reply)
Discussion started by: beginningDBA
1 Replies

2. Shell Programming and Scripting

help with RSH script

Hi All, I wrote a quick script but don't know how to execute the command and bring the info back to me. Please advise. #!/usr/bin/ksh for SYSTEM in xyz abc do echo $SYSTEM rsh $SYSTEM lscfg -v |grep hdisk ## Need to find out how many disk drives it has done (1 Reply)
Discussion started by: samnyc
1 Replies

3. Linux

rsh to other machine using script

Hi, I want to rsh to other machine & run a script, but it is nt working eg: rsh host command but after this it doesn't login into that machine & run the command on y machine but if i write rsh host then after loggi i write commands it works. Is i am doing something wrong. I jus need... (2 Replies)
Discussion started by: sarbjit
2 Replies

4. Shell Programming and Scripting

Permission denied while executing rsh

Hi All, I have two servers, say server1 and server2. I have put the entries of both servers in /.rhosts file of both servers. So, when I tried to run following from server1- rsh server2 "ls" Permission denied was printed on console. Can anyone help me out? Regards, akash mahakode (4 Replies)
Discussion started by: akash_mahakode
4 Replies

5. Shell Programming and Scripting

rsh script with inside a for loop

hi everyone, I have the following problem: the foreach loop inside rsh doesn'work. I have tried the for command but it's not recognized. with the foreach command I don't receive any error, but it doesn't really make the cycle, ignoring the foreach and executing 1 time the echo command. Anyone has... (5 Replies)
Discussion started by: trekianov
5 Replies

6. Shell Programming and Scripting

running multiple rsh command in a script

hi scripting experts, juz wondering if it's possible to have multiple rsh command in a single script? :confused: ie: rsh -l <username> "<command>" rsh -l <username> "<command>" thanks. regards, wee :) (0 Replies)
Discussion started by: lweegp
0 Replies

7. Shell Programming and Scripting

unzip in script using rsh

Hi I have searched usr/bin and usr/sbin to try to find unzip but I cannot find it. My script is using the ksh #!/usr/bin/ksh but when I rsh to another box it cannot find unzip to unzip to a new archive, but I can unzip files when I am using a telnet session on the box. The error message... (4 Replies)
Discussion started by: speedieB
4 Replies

8. Shell Programming and Scripting

Script using rsh(remote shell)

Hi, I am writing a script that will require me to perform tasks across servers. I tried to use rsh <host> "Commands..." > /dev/null 2>&1. However, I am required to execute a long series of commands after that and rsh does not seem to support this and its also insecure. I tried to use rsh to... (5 Replies)
Discussion started by: joseph_ng
5 Replies

9. Shell Programming and Scripting

Multiple rsh in a script not working

Hi, From one of the unix servers i want execute an rsh command to 5 different servers. i want to go to these servers execute a command and come back. i have a main program which calls a function, where in i use the rsh command. The server name is passed as a parameter to teh function. it is... (3 Replies)
Discussion started by: praphul
3 Replies

10. UNIX for Dummies Questions & Answers

remote login through a script ( except rsh)

Hi Guys, I'm having a problem trying to change to a different user within a script . I want to change to a specific user and then run the subsequent commands using his previleges . I remember having used ' su ' some years back for this , can't figure it out now !! Help appreciated . (3 Replies)
Discussion started by: rahma
3 Replies
Login or Register to Ask a Question