Create folders in batches and create users in batches for Serv_U

Source: Internet
Author: User

I did not find a good method after reading it online. No way, you can only use the old one and use the DOC to create it.

Steps.

1. Create a folder for each account.

If the account is regular, let's say, for example, ftp001 and ftp001 ...... Ftp100 can be automatically generated directly in Excel, and then the generated account is put into a txt file with one account line. If it is not regular, there is no way to enter one by one.

2. After the account.txt file of this account number is ready, create a run. bat file, open the file, and enter the code.

@ For/f % I in (account.txt) do @ mkdir % I

Pause

Save it as run.bat, and then run the command again and again, that is, all the directories in the account.txt file can be saved.

Explanation: The one-line account of/catalog, that is, the directory name. This is a simple for loop.

3. If you want to copy the same file to the Created directory in batches, just add one sentence to the run. bat file.

For example, @ for/f % I in (account.txt) do @ copy index.htm % I. This is the process from beibeiindex.htm to all the directories just created.

Using two methods can solve many problems.

4. Make a summary. If you want to create an ftp account and put a file in the directory of each user, for example, I want to create a txt file in each folder of the created account, prompting the user to change the password in time. In this case, create a bat file and enter the following information:

@ For/f % I in (bm.txt) do @ echo the default user name is % I, and the password is 123456. After obtaining the account, please change your password through DOC> % I/%% I .txt in time
Pause

Add a file in each user folder named "current account number. txt". The file content is shown in the preceding Chinese characters.

5. Okay. The account file has been created. How can I create an FTP account? I use Serv U to open the serv U file. You will find a ServUDaemon. ini file in it. You will find it when you open it! O! It turns out that all users are here, so it's easy to do it. Observe carefully and you will find it quite regular. User1, and User2... Well, as follows:

User1 = dzz | 1 | 0
User2 = tzz | 1 | 0
User3 = jk | 1 | 0
User4 = dx | 1 | 0

And his password permissions.

[USER = dzz | 1]
Password = fjE371F8A2F2655DAFF87F257342B6EC4C
HomeDir = d: \ javasmenthtmls \ dzz
RelPaths = 1
ChangePassword = 1
DiskQuota = 1 | 20971520 | 0
PasswordLastChange = 1239339982
TimeOut = 600
Access1 = D: \ javasmenthtmls \ dzz | RWAMLCDP

You must have understood it.

That's easy. We can use the doc to generate the above User1 = ××× | 1 | 0, and his permission file, and then copy it to the ServUDaemon. ini file.

However, one problem is that all accounts and passwords are the same and should be encrypted. We should first create an account to remember the ciphertext of the password, then all other accounts use this ciphertext.

6. How can I generate the above account file? I want to explain it all over the world, using excel, batch processing commands, database commands, and so on.

7. How can I change the password? To change the password after logging on to the ftp client, we still need to rely on doc

1. Run cmd
2. Enter the ftp command
3. Enter the open IP address.
4. Enter your user name
5. enter your password
6. The system prompts that the logon is successful.
7. Change the password. quote "site pswd old password new password" -------- do not omit quotation marks
8. The system prompts that the password is successfully modified.

Tip: You must have the permission to change the password.

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.