Dial-In Connection With Authorization |
Top Previous Next |
In this example, FileLink is acting as host for remote dial-in users in an async modem environment. FileLink prompts for and verifies the user name and password of the caller.
ANSWER /timeout=0 ;; check for connection IFERROR!= $ERROR_SUCCESS goto Exit ;; Prompt for user name and wait 60 seconds for a response LINEOUT "Enter your user name:" /flush LINEIN username /flush /timeout=60 IFERROR= $ERROR_SUCCESS goto Operation2 GOTO Disconnect :Operation2 ;; Validate that the user name is one we recognize ;; Authorization records have been pre-created in "authfile.txt" AUTHUSER username "authfile.txt" IFERROR= $ERROR_AUTHORIZATION_FAILED goto Disconnect ;; User was found in authorization file ;; Prompt for password and wait 60 seconds for a response LINEOUT "Enter your password:" /flush LINEIN password /flush /timeout=60 IFERROR= $ERROR_SUCCESS goto Operation3 GOTO Disconnect :Operation3 ;; Validate that the password for this user AUTHPW username password "authfile.txt" IFERROR= $ERROR_AUTHORIZATION_FAILED goto Disconnect ;; Password matched for this user ;; Send predefined greeting #1 to this user AUTHDATA username greeting "1" "authfile.txt" LINEOUTLINEOUT greeting /flush :Operation4 ;; here the script might send or receive a file ;; or perform other required operations . . . :Disconnect DISCONNECT :Exit EXIT
In this example, an entry in the authorization file might look like this:
benfrankin,bennyf,Thanks for calling
|