home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 21658 < prev    next >
Encoding:
Text File  |  1993-01-21  |  2.0 KB  |  60 lines

  1. Newsgroups: comp.os.vms
  2. Path: sparky!uunet!gatech!destroyer!cs.ubc.ca!mprgate.mpr.ca!vli
  3. From: vli@mpr.ca (Vincent Li)
  4. Subject: Re: Set Host command file
  5. Message-ID: <1993Jan21.233900.1018@mprgate.mpr.ca>
  6. Sender: news@mprgate.mpr.ca
  7. Organization: MPR Teltech Ltd., Burnaby, B.C., Canada
  8. References: <01GTLB3KG9ZU8WW0YW@kopc.hhs.dk> <17JAN199319441116@nereid.sunquest.com>
  9. Date: Thu, 21 Jan 93 23:39:00 GMT
  10. Lines: 48
  11.  
  12. In article <17JAN199319441116@nereid.sunquest.com> spg@nereid.sunquest.com (Steve Gibbons) writes:
  13. >In article <01GTLB3KG9ZU8WW0YW@kopc.hhs.dk>, ARNE@KOPC.HHS.DK (Arne Vajhxj) writes...
  14. >#>     1   get my USERNAME using f$getjpi
  15. >#>     2   issue "SET HOST" to the node whose name I pass into the com file
  16. >#>     3   Accept my username as input at the username prompt on the machine to
  17. >#>         which I am setting host to
  18. >#> 
  19. >#I am not an expert in RTPAD.EXE/LOGINOUT.EXE, but it sounds impossible to me.
  20. >
  21. >It's not (at least under V5.4 and V5.5-2.)  I'm told that this "functionality"
  22. >may dissappear in a future release.  I've already emailed a similar response to
  23. >the original poster.
  24. >
  25. >$ user = f$getjpi(0,"username")
  26. >$ open/write t sys$scratch:t.com
  27. >$ write t "$ set host ''p1'"
  28. >$ write t "''user'"
  29. >$ close t
  30. >$ @sys$scratch:t
  31. >
  32. This bit will also work:
  33. $ host_name = .... (eg. 'p1)
  34. $ user_name = f$getjpi(0,"username")
  35. $ open/write data sys$scratch:user.dat
  36. $write data "''user_name'"
  37. $close data
  38. $ define sys$input sys$scratch:user.dat
  39. $   SET HOST 'host_name'
  40. $!
  41. $! we are now off at the remote host
  42. $!
  43. $ say "Logging off"
  44. $ LOGOFF
  45. $ set on
  46. $ exit
  47.  
  48. >This won't work when connecting to an ULTRIX box running DECnet, since buffered
  49. >I/O is handled differently by UNIX.
  50. >
  51. >Now for the reason for the disclaimer:  Don't even _think_ about adding a line
  52. >that includes the password.  Yes, it works.
  53. ..And I've seen that done too! I took the password out. 8-)
  54.  
  55. -- Vince
  56.  
  57. ---------------------------------------
  58. vli@mprgate.mpr.ca        |-) It works well under pressure: Another thing
  59.                           |-] you can say about your pillow. -- Mr Boffo
  60.