Trigger an nsrjb command remotely!

Hans1981

Newcomer
Joined
Dec 4, 2008
Messages
3
Reaction score
0
Points
0
Hi all,

I don't have a question, but something I found out this week when I tried to remotely trigger commands to an external host on our network.
The company where I work for do have around 30 external hosts which are located in Europe. We are administering these external hosts and have to see if people in those countries are changing tapes and stuff.

What I did before was triggering an batch file which I placed on a share located at the source server by using reexec.exe.
This week I red something about the RCMD command on this forum, not in the way I am using it now because that was just a lucky try which was giving me the result I wanted.

RCMD \\externalhost nsrjb –H
RCMD \\externalhost nsrjb -I -S 1-7
RCMD \\externalhost nsrjb -N -o recyclable -S 1-4 -Y
RCMD \\externalhost nsrjb -N -o readonly -S 5 -Y
RCMD \\externalhost nsrjb > C:\temp\test.txt

1) Triggering the reset command to the external host
2) Triggering the inventory command on slot 1 --> 7.
3) Triggering the command to recycle Slot 1 --> 4
4) Triggering the command to make the tape in slot 5 readonly.
5) Displaying the output in a text document with which tapes are in.

I understand that people think why use the 3rd and 4th one, but this is something we use in our company here.
It's just that I wanted to share this RCMD command, because I could not find anything like this on the internet.

You can just trigger any nsrjb, nsrjim, nsrmm command on a remote host with this and receive the output on the host you are running the command from.

Hope someone was looking for the same result, and could not find the solution to do it and that this could be of any help for someone.

Thanks,
Hans
 
It is not easy - you should know how Remote Procedure Calls and nsrexecd works. However, you should be able to execute any command remotely at the NW host as long as the client daemon (nsrexecd) is running and the /nsr/res/servers file allows you to do so.

Here is a 'frame' which should guide you:

C:\>SET RUSER=root
C:\>echo %RUSER%
root
C:\>SET RCMD=savegrp -G Default
C:\>echo %RCMD%
savegrp -G Default
C:\>nsrexec -c target_host
C:\>
 
Back
Top