Documentation forServ-U File Server

Serv-U domain details: database

Serv-U File Server enables the use of an Open Database Connectivity (ODBC) database to store and maintain group and user accounts at both the server and domain levels.

Serv-U File Server can automatically create all the tables and columns necessary to store users and groups in the database. Because Serv-U File Server uses one set of table names to store its information, individual ODBC connections must be configured for each item which stores details in the database. In other words, the server and each domain must have unique ODBC connections to ensure they are stored separately.

Configure a database

Create an ODBC connection for Serv-U File Server to use. SolarWinds recommends MySQL, but you can use any database that has an ODBC driver available.

  1. Enter a Data source Name (DSN) if the Serv-U File Server is operating as a system service, or a User DSN if Serv-U File Server is operating as a regular application.
  2. Open the Management Console and browse to the appropriate domain or server database settings. Enter the required information, and click Save.
  3. If configuring the database connection for the first time, leave the "Automatically create" options selected. With these options selected, the SolarWinds Serv-U File Server builds the database tables and columns automatically.

SQL templates

Serv-U File Server uses multiple queries to maintain the databases containing user and group information. These queries conform to the Structured Query Language (SQL) standards. However, if your database has problems working with Serv-U File Server, you may need to alter these queries.

  1. Click SQL Templates.
  2. In the SQL Templates window, modify each query used by Serv-U File Server to conform to the standards supported by your database, and click Close.

Incorrectly editing these SQL queries could cause ODBC support to stop working in Serv-U File Server. Do not edit these queries unless you are comfortable constructing SQL statements and are sure that it is necessary to enable ODBC support with your database software.

User and group table mappings

By default, Serv-U File Server creates and maintains the tables and columns necessary to store user and group information in a database. However, if you want to connect Serv-U File Server to an existing database that contains this information, you must customize the table and column names to conform to the existing database structure.

  1. Click User Table Mappings or Group Table Mappings to get started.
  2. Select the Object Table.

    Serv-U File Server stores information for a user or group in 10 separate tables. Only the User/Group Info Table and User/Group Dir Access Table are required. You can change the current table in the Object Table list. The Attribute column lists the attributes that are stored in the current table. The Mapped Database Value displays the name of the column that attribute is mapped to in the database. The first row displays the table name and you can change the name.

    Certain tables, where the order of the entries is important, have a SortColumn attribute listed. This column is used to store the order in which rules are applied.

  3. Select and attribute and click Edit or double-click the column name to edit a value.

    When enabled, the table is accessed as needed. In special situations, a table that is not being used can be disabled to reduce the number of ODBC (database) calls. For example, if you do not use ratios and quotas, you can disable the User Ratio-Free Files, Per User Files Ratio, Per User Bytes Ratio, Per Session Files Ratio, and Per Session Bytes Ratio tables to prevent unnecessary ODBC calls. Use caution when you disable tables, because although the fields appear in dialogs, they will not be saved or loaded.

  4. The User Info and Group Info tables cannot be disabled.

Case file: ODBC authentication

Authentication in the SolarWinds Serv-U File Server can be handled through an ODBC database, allowing for scripted account management and maintenance. To use ODBC functionality, migrate to ODBC authentication through a database. By storing credentials in settings in a database, accounts can be managed from outside the Management Console through scripted database operations which can be built into many existing account provisioning systems. A DSN must first be created in Control Panel > Administrative Tools > ODBC Data Sources. Use a System DSN if Serv-U File Server is running as a service or a User DSN if Serv-U File Server is running as an application. After you create the appropriate DSN, enter the required information and click Save. Serv-U File Server creates the tables and columns. You can manage database users and groups in the Database Users and Database Groups pages of Serv-U File Server, located near the normal Users and Groups pages.

Data source name creation in Linux

Database access in Serv-U File Server on Linux follows the same method as Serv-U File Server on Windows, with the one change to how data source names are created. On Linux, you can create a DSN after installing the following packages:

  • mysql-connector-odbc
  • postgressql-odbc
  • unixodbc

Only the ODBC driver corresponding to the database needs to be installed. If Serv-U File Server is running as a service, the next step is to edit the /etc/odbc.ini file, which contains all system-level DSNs. If Serv-U File Server is running as an application, edit the ~/odbc.ini file instead, and then enter the parameters as follows:

[MySQL-test] Description = MySQL test database Trace = Off TraceFile = stderr Driver = MySQL SERVER = YOURIPADDRESS USER = USERNAME PASSWORD = PASSWORD PORT = 3306 DATABASE = YOURDATABASE

[PostgreSQL-test] Description = Test to Postgres Driver = PostgreSQL Trace = Yes TraceFile = sql.log Database = YOURDATABASE Servername = YOURIPADDRESS UserName = USERNAME Password = PASSWORD Port = 5432 Protocol = 6.4 ReadOnly = No RowVersioning = No ShowSystemTables = No ShowOidColumn = No FakeOidIndex = No ConnSettings =

Adjust the names in brackets to the DSN name string you want. Finally, test the DSN with the isql %DSN% -c -v command.

For further customization options, see the Serv-U Database Integration Guide.