home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / question / 15787 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.7 KB  |  43 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!spool.mu.edu!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!ux4.cso.uiuc.edu!lnosek
  3. From: lnosek@ux4.cso.uiuc.edu (Luke Nosek)
  4. Subject: Re: Need to login many times, but type passwd once.
  5. References: <C12Ht4.1Jp@news.cso.uiuc.edu>
  6. Message-ID: <C16s46.HMz@news.cso.uiuc.edu>
  7. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  8. Organization: University of Illinois at Urbana
  9. Date: Thu, 21 Jan 1993 04:21:41 GMT
  10. Lines: 31
  11.  
  12. lnosek@uiuc.edu (Luke Nosek) writes:
  13.  
  14. >    I'm in a situation where I'd like to login to several (10+)
  15. >machines that I have accounts on, execute a command, and logout.
  16.  
  17. >    If I were to do this the easiest way, it would be rshing
  18. >to these machines, and executing the command. But to have rsh work
  19. >I need to have a working .rhosts file on all the machines. We're not
  20. >allowed one because it would be to insecure a system.
  21.  
  22. >    So I'm stuck with at the very least typing in the passwd
  23. >for EACH AND EVERY machine that I want to login to. I want to automate
  24. >this process.
  25.  
  26. >    I know that I can simply redirect ( < ) a file to, for example
  27. >the ftp program, such that it logs in and types the passwd for me, then
  28. >gets the file I want for me, all by typing ftp -ni < file, where file
  29. >contains the necessary commands for ftp.
  30.  
  31. >    When I tried this with rlogin, it does not accept the password
  32. >from the redirected file. I know this is a security measure, but for
  33. >my convienience, and for the success of my project, I need to  
  34. >circumvent this.
  35.  
  36.     Thanks to everyone who mailed the answer - use a little program
  37. called expect which allows you to develop scripts that can communicate
  38. back and forth with shell commands.
  39.  
  40. ie:    rlogin, expect waits for the Password: prompt, then sends password.
  41.  
  42.                             Luke Nosek
  43.