Skip to main content

Auto-Logging In With Anzio

Introduction

AnzioWin and Anzio Lite both support two simple approaches to automated logins. The first deals with a long-existing URL standard that passes a login and password as part of the host name to connect to. The second is a feature called "Login Wizard". This is a feature included with AnzioWin and Anzio Lite version 12.0 or later.

The URL Standard

There is an official standard for every URL type currently in use. One of these URL types covers the telnet protocol and within that standard there is a mechanism for passing additional information to the host, including a user name, and even a password, as part of a telnet URL reference. Some examples are:

telnet://sitename

telnet://sitename:port

telnet://username@sitename

telnet://username.password@sitename

telnet://username.password@sitename:port

telnet://username@sitename

Although the last example exposes the password to the user, it may be useful. The form 'username@sitename' however seems to offer some very useful opportunities for automation. That is, it would be nice to not have to tell the user to log in as "library", or "guest" or whatever.Of course, for Anzio to get this information through a web link, the web browser being used has to pass it along. Indications are that IE does, but Netscape does not.  However, if you have a link on a Word document (or any Office document) that looks like

telnet://guest:testacct@hostware.com

With Anzio set as your default Windows telnet client, Anzio will attach to this site and login as "guest" with a password of "testacct" (more information on making Anzio your default telnet client can be found at Microsoft's web site).

The auto-login wizard

Starting with AnzioWin and Anzio Lite version 12.0, a featured called the Auto-Login Wizard can be found under the Communicate menu and the Login submenu. The Auto-Login option can be turned on or off by checking the "Login Wizard" menu item (which will be saved in the defaults file). Along with a password and user name, also entered from this menu, this option will cause Anzio to wait for a login and then try to automatically start the login process for you.

This works equally well under a telnet, modem or serial connection, as well as under an SSH (Secure Shell) connection with one exception.

In the world of SSH it is NOT good practice to save a password (it may be defeating any user authentication process). Because of this, by default the option to save an SSH password is turned off. You can change this default option in the Advanced Options dialog

If you do not include a password, Anzio will wait when one is asked for. If you do not have a User Name, the auto-login wizard does not start at startup.The Advanced Options dialog (under the Edit menu) controls what strings Anzio will wait for when attempting to log in to the host. The last three fields on the General tab include the prompt to search for when passing the user name, the prompt to search for when passing the password, and the prompt separator when you include multiple optional words. 

The example dialog above works like this. Anzio's Auto-login Wizard first looks for the string "login:", if not found, then it looks for "logon:", then "user:", then "username:". If none of these are found, the auto-login fails to run. After a successful login is found, the script then waits for "password:" before proceeding. At any time in the process, if one part fails, the script simply stops and allows the user to proceed manually.

Additional ways Anzio can work

Various other approaches exist that allow you to automatically log in when using AnzioWin or Anzio Lite.

Script Control

If you are familiar with Microsoft Windows Script Control, you can actually "push" keys at an application that is controlled by a script. Using the Windows Script Host, Visual Basic Script (vbScript), Java Script, or a third part script engine, you can start Anzio, sleep for a few seconds, push some keystrokes to Anzio, wait a few more, push some more, etc. A simple script to do this is below. You would initiate this script by doing

wscript //e:vbscript anziocontrol.ws

The script is a Windows Script Host script, but is easily adjusted for vbscript:

Set WshShell = WScript.CreateObject("WScript.Shell")
Set ObjArgs = WScript.Arguments

strAnzio = "anzio32"
strArg = " c:\anzio\host1.def"

if ObjArgs.Count > 1 then
   strPasswd = objArgs.Item(1)
   strUsername = objArgs.Item(0)

   WshShell.Run strAnzio + strArg 
   WshShell.AppActivate("Anzio32") 

   WScript.Sleep 1000 
   WshShell.SendKeys strUsername + vbLf
   WScript.Sleep 1000
   WshShell.SendKeys strPasswd + vbLf

else
   MsgBox "need user name and password to run correctly"
end if

For additional information on Anzio and the Microsoft Script Control and Script Engine, see the Anzio manual.

Command Line Startup

From the command line, you can pass AnzioWin or Anzio Lite the URL to connect to. You can hence pass it with the username and password as part of the URL, just as you would find it from an Office document or a web page:

c:\anzio\anzio32 telnet://guest:mypasswrd@hostsystem.com

AnzioWin Startup Macro

The command line can contain any or all of:

Copyright © 2024 Rasmussen Software, Inc. Legal Information & Privacy Policy
Send comments and suggestions to rsi@anzio.com