elsen@esat.kuleuven.ac.be (09/24/90)
Can I execute a remote shell ("task") using DECnet Task-to-Task communication between Ultrix (target) and VMS ? The target node runs Ultrix (UWS 2.1) and the originating node runs VMS V5.3-1. I know it works between VMS systems but when I type something like $ type ultrix_node::"0=/usr/users/elsen/shellscript.sh" ! issued on VMS host I always get '...network object is unknown at remote node' I tried setting and defining a 'TASK' object on Ultrix using several flavours but to no avail ? You want to know WHY I want to do all of this : We are designing an application which executes both on VMS and Ultrix platforms : a VMS COMM file generates an Ultrix shell script and which is then copied to an Ultrix running target node. I only need a way to fire it up from within the VMS command file. If you have other solutions (without using DECnet ?) please tell me , because even if I get this to work I wouldn't want to use the TASK object in the end since it isn't secure enough. Thanks -- Marc Elsen (System Manager/Software Engineer) Katholieke Universiteit Leuven Dep. E.S.A.T. Kard. Mercierlaan 94 3030 HEVERLEE Belgium tel. 32(0)16220931(ext. 1080) EMAIL : elsen@esat.kuleuven.ac.be psi%02062166012::elsen (VMS PSI MAIL)
allebrandi@inland.com (Tom Allebrandi) (10/05/90)
In article <1990Sep23.190812.3629@esat.kuleuven.ac.be>, elsen@esat.kuleuven.ac.be writes: > Can I execute a remote shell ("task") using DECnet Task-to-Task > communication between Ultrix (target) and VMS ? > The target node runs Ultrix (UWS 2.1) and the originating node > runs VMS V5.3-1. Yes you can do it but there are a number of little things to watch out for. First, what you are trying doesn't work. (It wouldn't work on VMS either.) On VMS, you don't give the path to the file to execute. Instead you give an object name type node::"0=OBJECT" If a VMS node received that object request, it would look for a predefined object of that name in the network database. Not finding one, it would look for OBJECT.COM in the root directory for the username that the network process is executing under. I know that the manual says that you give a path name but I have never gotten it to work. DECnet/Ultrix does almost exactly the same thing as VMS. The difference is that when it looks for the object file, it uses the path for the user instead of just the home directory. Also two big things to watch out for: 1) The object name is sent over in uppercase. This means that name of the object file to execute must be in uppercase is you are using it this way; 2) The object file must have "x" permission or DECnet will claim that the object is not there. For example, let's say that you have proxy login's enabled from the VMS to the Ultrix host. If you placed a file DOSCRIPT in your home directory, you could invoke it from VMS using: type node::"0=DOSCRIPT" Note that DECnet/Ultrix uses exec() to start the object. This means that it may be a shell script or an executable. Following my signature are a couple of example files. The first is a DOSCRIPT shell script that will execute any shell script on the Ultrix side. You send the name of the script to execute over the network to the object process. The second example shows how to use DOSCRIPT from the VMS side. Let me know if you have any questions. I'm not a real expert on this but I just the other day went through figuring it out. --- Tom Tom Allebrandi | Vice-char and mail guru, VMSnet WG, DECUS VAX SIG Inland Steel Research Labs | Internet: allebrandi@inland.com East Chicago, IN | UUCP: ...!uunet!inland!allebrandi 219 399 6306 | DECUServe: allebrandi BIX: ta2 ---------- DOSCRIPT ---------- #!/bin/sh # This is a DECnet network object file. Either place it somewhere # on the path of the user in which network the object is to execute, # or, define it as a network object with ncp. # # If you do not define this file as a network object, make sure # that the file name is in UPPERCASE. On VMS, when you do # # type node::"0=OBJECT" # # The object name is sent over in upper case. # # Also, be sure that you set execute mode on this file. DEcnet will # claim that the object is non-existant if you don't. # #---------- # The remote side is going to send over the network the name of a script to # execute. Read the name into a shell variable. # scriptname=`cat` #---------- # The script file was probably just copied over here which means it does # not have "x" access. Fix that. # chmod +x $scriptname #---------- # Execute the script # $scriptname ---------- REMLS.COM ---------- $! REMLS.COM $! $! Simple example showing how to execute an "ls" command on an Ultrix-32 $! host. $! $! Caveats: the DOSCRIPT object must be available on the Ultirx side; $! this will probably work a lot better if you have proxy $! logins enable from the Ultrix host to the VMS host $! $!---------- $! Cleanup so we we can wait for this file below $! $ delete == "" $ delete sys$login:temp.ls;* $ $!---------- $! Create a shell script for the Unix side $! $ create temp.sh !(Hack to force the creation of a text format file) $ open/append fyle temp.sh $ write fyle "#!/bin/sh" $ write fyle "ls | dcp - ${REMNODE}::""sys\$login:temp.ls""" $ close fyle $ $!---------- $! Copy the script over to the Ultrix machine. Be sure to give the $! output path so that you have some control over the name on the other $! side. (Otherwise you tend to end up with "CAPITAL.LETTERS;VERSION") $! $ copy temp.sh harem::"/tmp/temp.sh" $ $!---------- $! Invoke DOSCRIPT. It expects to receive the name of the shell script $! from us. $! $ open/write fyle harem::"0=DOSCRIPT" $ write fyle "/tmp/temp.sh" $ close fyle $ $!---------- $! Attempt to type out the output from the Ultrix machine $! $ set noon $loop: $ type sys$login:temp.ls $ if $severity then goto pickup $ wait 00:00:10 !10 Seconds $ goto loop $pickup: $ delete sys$login:temp.ls;* $ exit ---------- End of files ----------