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.
- Select the 'Users' panel from the side-bar menu.
- In the 'Authenticators' section, enable Database authentication method by checking its 'Enabled' checkbox.
- 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.
- Click the 'Configure' link to open the 'Database Configuration' dialog box.
- Select the desired database type from the 'Database type' drop-down list. Note that new database types can be
added (see here).
- Enter the connection string into the 'Connection-string' text box. For connection string examples, click the 'examples' link
or visit the website connectionstrings.com.
- Click the 'Test connection' button to verify that it works.
- Click the 'OK' button.
- 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.
- 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.
- Click the 'OK' button.
- In the 'Password encoding' section, you can select either 'Plain text' option
OR 'MD5/SHA1 hash' option.
- Click the 'OK' button to close the 'Database Configuration' dialog box.
- 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.