How to store user information of FTP service Serv-U into the database

Source: Internet
Author: User

Currently, the most popular FTP service in the Win32 system is ServU, Which is powerful and stable and has been released to version 6.x. The interface for creating an FTP account is also very simple and clear, but I have to set up hundreds of FTP accounts in a recent project. At this time, the points of each account are quite cumbersome and error-prone, in this case, the ODBC database connection function of Serv-U is required. ODBC does not need to be introduced much. It is a connection technology for obsolete databases. Although it will be eliminated, it is enough for Serv-U. The following describes how to store user information into a database through an ODBC connection. First, create a domain. The previous fields are all in the normal mode. In Step 4, select "store in ODBC database ". After the domain is created, the "ODBC" tab of the domain appears! It's an exaggeration to fill in so many items! What you need to do is to turn off Serv-U and don't hesitate. Open your browser, enter the following address: browse access ODBC example "" ms SQL Server ODBC example "" My SQL ODBC example "" Oracle database for use with Serv-U ", which basically covers all routines of mainstream databases., even below, just click the green down arrow. Anyway, there is a lot of "free" in the back, which seems to be better for foreigners than in the old world, you don't have to pay for it ...... I downloaded the "ms SQL Server ODBC example", which is a compressed package. After the unzipping, three files are: one SQL script and one. Doc document (I did not see it, but there is also an add-to-ini.txt file. First, use the SQL script file. This is very simple. Use the query analyzer to connect to your database, and then run this script, after the script is run, there will be six more "FTP _" databases in the database. This is the data table added by the script. After all, we will process the “add-to-ini.txt file. First, find the file directory of Serv-U, which contains a "servudaemon. INI file (the one with a long name), open it, and read the INI file. It doesn't matter if you haven't read it. It's very easy. First, find the "[domains]" item, you can find the domain you just added in Serv-U, for example, if you add "local test", you can find the corresponding content "domain4 = 127.0.0.1 | 25 | Local test | 4 | 0 | 1" and then find the corresponding value here. the corresponding item "[domain4]" of "domain4" should be shown as follows: [domain4] cachettl = 60 odbcsource = | odbctables = | odbccolumns = | | directly use the values provided in “add-to-ini.txt to replace the values in "odbctables" and "odbccolumns" Do not replace [domain4], and then save and close the INI file. Restart Serv-U. After the restart, check again. The content in the ODBC tab in the newly created domain is basically the same. The ODBC connection is established below. Open "Data Source (ODBC)" and click "add" on the "user DSN" tab to add a data source. Be sure to select the database for storing user information. Test whether the connection is successful. After the data source is created, go back to the ODBC tab of the field added in Serv-U and add the name of the ODBC source in "ODBC source name, it is the one you entered at the beginning, and then fill in the account name and account password in the response of "ODBC account name" and "ODBC account password, if the local "WindowsNT verification with network login ID" is created during data source creation, you do not need to enter the user name and password. Then, we are done! In fact, there are still two other items left blank, because the example below seems to be a little older, missing the "Name of the last password change date" and "Name of the Account Expiration type ", those who are interested can only read help, and it seems that they have all written it. History file, which records some ODBC connection records.

By now, the ODBC connections of Serv-U have been set up, and the password is encrypted by default. In fact, there is no need to store the ciphertext in the database, you can store the plaintext password in the database only when you do not select "Save Password and encrypted form" on the "advanced" tab of the "Settings" project of the domain.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.