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