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. Click the 'General user settings' link at the top of the panel.
  3. In the 'General User Settings' dialog box (this has now been changed as the dialog box is now found below the user list), enable Database authentication method by checking its 'Enabled' checkbox.
  4. 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.
  5. Click the 'Configure' link to open the 'Database Configuration' dialog box.
  6. Select the desired database type from the 'Database type' drop-down list. Note that new database types can be added (see here).
  7. Enter the connection string into the 'Connection-string' text box. For connection string examples, click the 'examples' link or visit the website
  8. Click the 'Test connection' button to verify that it works.
  9. Click the 'OK' button.
  10. 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.
  11. 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.
  12. Click the 'OK' button.
  13. In the 'Password encoding' section, you can select either 'Plain text' option
    OR 'MD5/SHA1 hash' option.
  14. Click the 'OK' button to close the 'Database Configuration' dialog box.
  15. Then click the 'Close' button to close the 'General User Settings' dialog box.
  16. 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.