AUTHDATA        Obtain user data from authorization file

Top  Previous  Next

Syntax:

AUTHDATA

[ user ]  [ data ]  [ field ]  [auth file ]

Arguments:

[ user ]

Variable or string defining a user name; this is typically received from a remote user by way of the LINEIN command

 

[ data ]

Variable where the user data is to be stored

 

[ field ]

Variable or string specifying which of the two available user data fields is to be obtained; this value must be either "1" or "2"

 

[ auth file ]

Optional variable or string defining the name of the authorization file; if this is omitted, the default file "authorization.txt" is used

Options:

None

 

 

 

This script command would be used when FileLink is acting as a host to remote systems in an async modem protocol file transfer environment.

 

This command to may be used to obtain pre-defined information about a particular remote user. The process involves prompting for a user name, searching for a match within a previously created authorization file, and if found, returning one of two different string values associated with that user. See Authorization File Format for more information on how these values are stored.

 

Consider the following example where the remote user is prompted for a user name and password, and if the user is verified, the working folder for that user is changed to a directory name saved in the first data field for that user in the default authorization file.

 

LINEOUT "Enter your user name:"

LINEIN username /timeout=60

AUTHUSER username

IFERROR= $ERROR_AUTHORIZATION_FAILED goto UnrecognizedUser

LINEOUT "Enter your password:"

LINEIN password /timeout=60

AUTHPW username password

IFERROR= $ERROR_AUTHORIZATION_FAILED goto InvalidPassword

AUTHDATA username new_dir "1"

IFERROR= $ERROR_AUTHORIZATION_FAILED goto InvalidUser

WORKINGDIR new_dir

 

A matching entry in the authorization file might look like the following.

 

username,password,\user\username

 

Related Command(s): AUTHPW, AUTHUSER

See also: Authorizing Remote Users, Dial-In Connection With Authorization