Exporting Authentication Data

Introduction

MGI stores usernames, passwords, and other authentication data in a proprietary database format for the database that is built into the MGI code. However, you can use the export and import features of the mgiAuthenticateDB tag in admin mode to transfer authentication records. Passwords are stored in encrypted format in the internal "__MGIDB__Authentication__" database. Do not export records using the mgiEditDatabase tag or the passwords will export in encrypted format. The mgiAuthenticateDB tag in admin mode will decrypt passwords as they are exported and will export them in plain text.

MGI Tags

Steps

  1. Create an authentication administration page.
  2. Insert the mgiAuthenticateDB tag in Admin mode.
  3. Save the authentication administration page.
  4. FTP the authentication administration page to the web server running MGI.
  5. View the authentication administration page.
  6. Export Users.


Step 1: Create an authentication administration page.

Create a page named "authadmin.mgi" to display the web-based authentication interface. Open the page in a text editing program that allows you to view and modify the HTML and code of the page.

Step 2: Insert the mgiAuthenticateDB tag in Admin mode.

Enter the mgiAuthenticateDB tag and mode parameter. In the mode parameter enter "Admin". The admin interface will display at the location of the mgiAuthenticateDB tag.
<mgiAuthenticateDB mode="Admin">

Step 3: Save the authentication administration page.

Save the changes you have made to the authentication administration page.

Step 4: FTP the authentication administration page to the web server running MGI.

Upload the authentication administration page from your local computer to the web server using an FTP program.

Step 5: View the authentication administration page.

The first screen of the authentication administration interface is the search screen. Click the "Export" button to view the export screen.

Step 6: Export Users.

Beside "Filename", enter the name of the file to export. Exported files are saved to the web server in the same folder as the database administration page. Use a unique name if you do not wish to overwrite an existing file!
 
To export, click the "Export Now" button. Records are exported to the specified file on the web server. When the export is complete the search screen displays.The exported file is written in tab-delimited format to the same folder as the database administration page. You may use an FTP program to download the exported file.

 
The first line of the exported file contains a comment "!Generated by MGI!". The second line of the exported file contains the field definitions (in parentheses) to the left of each field name in the internal Authentication database. Each type of MGI field (text, long text, boolean, etc.) is represented by a letter:
  • B - True/False (Boolean)
  • I - Whole Number (Integer)
  • U - Positive Number (Unsigned Integer)
  • N - Decimal Number (Multi-Precision Float)
  • T - Text
  • L - Long Text
Text and decimal number fields are followed by the specified number of characters or decimal places. Field definitions with an "X" are indexed. Field definitions with a "Q" are unique.
 
The fields exported with the authentication data are the following and are in the following order:
  • Username
  • Password
  • Email Address
  • Group
  • Start Date (in Julian Day format)
  • End Date (in julian Day format)
  • Start Time (in military format)
  • End Time (in military format)
 
The remaining lines in the exported file are the tab-delimited authentication data of each user. All lines in the exported file end with a carriage return (Mac) or carriage return/line fee (NT).
 
The following is an example exported authentication file. The text in this example is wrapped for viewing purposes, however each record is actually only one row of tab-delimited text. The triangles in this example represent tabs and the horizontal lines as the end of each row represent a carriage return.


[Return to the Authentication Menu]


[Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]


[MGI Guides Main Menu] [User Guide Main Menu]