Authenticate users from a database

Before starting with this guide, you need to create a data-source corresponding to the database-type you will select in step 6 of this guide. This data-source may be a database table, spreadsheet or file, containing a list of usernames, passwords or password-hashes, and optionally home directories, groups, password-salts, RSA and/or DSA public keys.

  1. Select the 'Users' panel from the side-bar menu.
  2. In the 'Authenticators' section, enable Database authentication method by checking its 'Enabled' checkbox.
  3. Set the 'log-in-as' user for this authentication method via the 'Log in as' drop-down list (optional).
    Note: users connecting via this method are subject to the properties of the 'log-in-as' user. By default, the 'defaultDatabase' user is selected.
  4. Click the 'Configure' link to open the 'Database Configuration' dialog box.
  5. Select the desired database type from the 'Database type' drop-down list. Note that new database types can be added (see here).
  6. Enter the connection string into the 'Connection-string' text box. For connection string examples, click the 'examples' link or visit the website connectionstrings.com.
  7. Click the 'Test connection' button to verify that it works.
  8. Click the 'OK' button.
  9. Enter the SQL query for retrieving the user's password/password-hash into the 'Query for authenticating a user' text box. It may also optionally define a Windows home-folder, a comma-separated list of groups to which the user belongs and the password-salt.
  10. To test, enter the user-name and password of a user who exists in the user database, then click 'Test login' to verify that the SQL query works.
  11. Click the 'OK' button.
  12. In the 'Password encoding' section, you can select either 'Plain text' option
    OR 'MD5/SHA1 hash' option.
  13. Click the 'OK' button to close the 'Database Configuration' dialog box.
  14. Finally, click the 'Apply changes' button at the top right of the CompleteFTP Manager. Now, all users from the data-source can be authenticated without having to be explicitly added to the CompleteFTP's internal user list.