home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / novell / 10953 < prev    next >
Encoding:
Text File  |  1992-12-30  |  2.3 KB  |  73 lines

  1. Newsgroups: comp.sys.novell
  2. 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
  3. From: sdmoore@iastate.edu (Steven D Moore)
  4. Subject: Re: attach command wont take password.
  5. Message-ID: <sdmoore.725743423@pv1.adp.iastate.edu>
  6. Sender: news@news.iastate.edu (USENET News System)
  7. Organization: Iowa State University, Ames IA
  8. References: <D2150044.me0nk1@boomrang.boomerang.com>
  9. Date: Wed, 30 Dec 1992 19:23:43 GMT
  10. Lines: 61
  11.  
  12. In <D2150044.me0nk1@boomrang.boomerang.com> dak@boomerang.com (David A. Kearney) writes:
  13.  
  14. >Greetings,
  15.  
  16. >I have a book that says the 3.11 "attach" command should allow a password
  17. >in the form :
  18.  
  19. >%attach <server>/<login>;<password>
  20.  
  21. >But when I try to use it this way it still asks for a password.  Is
  22. >the book wrong or has something changed since the book?  More importantly,
  23. >is there a way to attach a server specifying the password for automatic
  24. >attaching?
  25.  
  26. >Thanx for your help
  27.  
  28. >Dave
  29.  
  30. Here is a utility I use to auto-start my gateways.  I use the CALL routine
  31. to this utility and pass it the SERVER, LOGIN ID and the full path to a file
  32. containing the password.
  33.  
  34. Hope it helps...
  35.  
  36. echo off
  37. rem
  38. rem  This utility will attach to a servers based on variables
  39. rem  set on entry
  40. rem
  41. rem  Variables:   %1:  Name of target server
  42. rem               %2:  Name of Login ID on target server
  43. rem               %3:  File containing the password for account
  44. rem
  45. rem================================================================
  46. rem       Check to verify that a file contains the password and it 
  47. rem       exists
  48. if exist %3 goto attachauto
  49. goto attachmanual
  50.  
  51. :attachauto
  52. rem       The password is contained in a file, us it to establish
  53. rem       the login session
  54.      echo attaching to %1 as %2
  55.      attach %1\%2<%3
  56.      goto Done
  57.  
  58. :attachmanual
  59. rem       Either no password file was given, or it no longer exists.
  60. rem       require entry of password from the terminal, provide
  61. rem       capability to retry as needed.
  62.      echo attaching to %1 as %2
  63.      attach %1\%2
  64.      if not errorlevel==1 goto Done
  65.      if errorlevel==1 yesno "Login Failed, do you wish to try again?"
  66.      if not errorlevel==1 goto attachmanual
  67.      echo Login failed, Please contact your System Administrator
  68. :Done
  69. exit
  70.  
  71. Steve
  72.  
  73.