home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!math.fu-berlin.de!ira.uka.de!Germany.EU.net!urmel.informatik.rwth-aachen.de!solaris.rz.tu-clausthal.de!news!zzsb
- From: zzsb@kursix.rrzn.uni-hannover.de (Wolfgang Sander-Beuermann)
- Subject: Re: Need to login many times, but type passwd once.
- Message-ID: <1993Jan27.063711.957@newsserver.rrzn.uni-hannover.de>
- Sender: news@newsserver.rrzn.uni-hannover.de (News Service)
- Organization: RRZN
- X-Newsreader: Tin 1.1 PL4
- References: <8838@news.duke.edu>
- Date: Wed, 27 Jan 1993 06:37:11 GMT
- Lines: 35
-
- >It seems to me that it would be best to discuss this issue with your
- >system administrator, rather than ask the net to help you try to
- >circumvent local policy. If it is indeed important, perhaps you can
- >convince him/her to help you.
-
- Just in case, you can not convince your management to use the (better)
- rsh-method, here is a litlle script, which does the same thing with
- telnet:
-
- ===================== Script ============================
-
- user=YourUsername
- passw=YourPassword
- (\
- sleep 5;\
- echo "$user";\
- sleep 10;\
- echo "$passw";\
- sleep 10;\
- echo "AnyCommand(s)";\
- sleep 5;\
- echo "exit";\
- sleep 5\
- )\
- | telnet AnyHost > tempfile 2> /dev/null
-
- ====================== Script end ========================
-
- You may not take out the sleep 5/10 lines, they are essential; if you
- have any problems with it, you might have to adjust those sleep times
- to your local conditions (i.e. make them longer or shorter).
-
- Hope that helps, Wolfgang
-
- Wolfgang Sander-Beuermann zzsb@kursix.rrzn.uni-hannover.de
-