From:	X::LJB          26-SEP-1986 12:40
To:	ARISIA::EVERHART
Subj:	Secure Network Copy command file

To: Glenn Everhart
From: Larry Bayuk, RCA-MSRD, Design Automation (224-3567)

I logged in to ARISIA::RCAUSER today and saw the instructions for
copying files.  I have a command file we use to 'push' files into
a secure node; it asks for the password and user name and plugs them
into command lines to form a Decnet access control string.
The command file follows in case you want to try it.

-LJB


$! NETCOM - Execute net command with explicit access control
$!    This command file lets you use an account across the
$!    network without making your password visible.
$!   (4/85 ljb, rca-msr DA)
$!
$  inquire user "Remote User Name"                   ! Get User name
$  set term/noecho
$! Don't use INQuire- It stores the response in Recall.... (at VMS4)
$  read/prompt="Remote Password : " sys$command pass ! Get password w/o echo
$  set term/echo
$  write sys$output ""
$  user = """" + user + " " + pass + """"            ! Build acces string
$  pass = ""
$!
$  write sys$output "Enter commands; <control>Z to exit"
$  set noon
$  open/read f sys$command                           ! Enter command loop
$  loop:
$    read/end=end_loop/prompt="netcom $ " f comm     ! Get a command
$    len = f$length (comm)
$    if len .eq. 0 then goto loop                    ! Blank line ?
$    n1 = f$locate ("::", comm)                      ! Look for node name
$    if n1 .ge. len then goto do_command             ! No node name found
$!               Build new command with acces control string
$    comm = f$extract (0, n1, comm) + user +  f$extract (n1, 999, comm)
$   do_command:
$    comm                                            ! Do the command
$  goto loop
$!
$ end_loop:
$  close f
$  exit
