home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.novell
- Path: sparky!uunet!news.uiowa.edu!hobbes.physics.uiowa.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!paladin.american.edu!darwin.sura.net!gatech!destroyer!news.iastate.edu!pv1.adp.iastate.edu!sdmoore
- From: sdmoore@iastate.edu (Steven D Moore)
- Subject: Re: attach command wont take password.
- Message-ID: <sdmoore.725743423@pv1.adp.iastate.edu>
- Sender: news@news.iastate.edu (USENET News System)
- Organization: Iowa State University, Ames IA
- References: <D2150044.me0nk1@boomrang.boomerang.com>
- Date: Wed, 30 Dec 1992 19:23:43 GMT
- Lines: 61
-
- In <D2150044.me0nk1@boomrang.boomerang.com> dak@boomerang.com (David A. Kearney) writes:
-
- >Greetings,
-
- >I have a book that says the 3.11 "attach" command should allow a password
- >in the form :
-
- >%attach <server>/<login>;<password>
-
- >But when I try to use it this way it still asks for a password. Is
- >the book wrong or has something changed since the book? More importantly,
- >is there a way to attach a server specifying the password for automatic
- >attaching?
-
- >Thanx for your help
-
- >Dave
-
- Here is a utility I use to auto-start my gateways. I use the CALL routine
- to this utility and pass it the SERVER, LOGIN ID and the full path to a file
- containing the password.
-
- Hope it helps...
-
- echo off
- rem
- rem This utility will attach to a servers based on variables
- rem set on entry
- rem
- rem Variables: %1: Name of target server
- rem %2: Name of Login ID on target server
- rem %3: File containing the password for account
- rem
- rem================================================================
- rem Check to verify that a file contains the password and it
- rem exists
- if exist %3 goto attachauto
- goto attachmanual
-
- :attachauto
- rem The password is contained in a file, us it to establish
- rem the login session
- echo attaching to %1 as %2
- attach %1\%2<%3
- goto Done
-
- :attachmanual
- rem Either no password file was given, or it no longer exists.
- rem require entry of password from the terminal, provide
- rem capability to retry as needed.
- echo attaching to %1 as %2
- attach %1\%2
- if not errorlevel==1 goto Done
- if errorlevel==1 yesno "Login Failed, do you wish to try again?"
- if not errorlevel==1 goto attachmanual
- echo Login failed, Please contact your System Administrator
- :Done
- exit
-
- Steve
-
-