In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to edit CentOS vsftpd virtual user file data, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
1. First create the CentOS vsftpd virtual user list file:
[root@KcentOS5 ~] # touch / etc/vsftpd/virtusers
A virtual user list file is created, which is a data file to record the username and password of the CentOS vsftpd virtual user. I name it virtusers here. To avoid file clutter, I put the list file under / etc/vsftpd/.
two。 Edit the CentOS vsftpd virtual user list file:
[root@KcentOS5 ~] # vi / etc/vsftpd/virtusers
Near
123456near
Mello
123456mello
Edit the CentOS vsftpd virtual user list file and add the user name and password information to it. The format is simple: "one user name, one password".
3. Generate a virtual user data file:
[root@KcentOS5] # db_load-T-t hash-f / etc/vsftpd/virtusers / etc/vsftpd/virtusers.db
Here, by the way, let me briefly explain this order.
See how db4's db_load command is used:
[root@KSRV2 vsftpd] # db_load
Usage: db_load [- nTV] [- c name=value] [- f file]
[- h home] [- P password] [- t btree | hash | recno | queue] db_file
Usage: db_load-r lsn | fileid [- h home] [- P password] db_file
Explain that in this article, several related options of the db_load command are very arguments.
The-T option allows non-Berkeley DB applications to easily load text files into databases.
If the database to be created is of type Btree or Hash, or the keyword keys is specified as set, the input must be paired
Lines of text, where the first line of the pair is the key item, and the second line of the pair is its corresponding data
Item. If the database to be created is of type Queue or Recno and the keywork keys is not set, the input must be lines of text, where each line is a new data item for the database.
Option-T allows the application to load the translation of text files into the database. Since we then store the information of CentOS vsftpd virtual users in the file, in order to make Vsftpd this
Applications can load user data through text, and you must use this option.
If the-T option is specified, the underlying access method type must be specified using the-t option.
If the option-T is specified, be sure to follow the sub-option-t
Specify the underlying access method. If no-t option is specified, the database will be loaded into a database of the same type as was dumped; for example, a Hash database will be created if a Hash database was dumped.
Btree and Hash databases may be converted from one to the other. Queue and Recno databases may be converted from one to the other. If the-k option was specified on the call to db_dump then Queue and Recno databases may be converted to Btree or Hash, with the key being the integer record number.
The sub-option-t, appended after the-T option, is used to specify the type of database to be loaded by translation. Under the extension introduction,-t can specify data types such as Btree, Hash, Queue, and Recon databases. Here, the next thing we need to specify is the hash type.
4. View the generated CentOS vsftpd virtual user data file
[root@KcentOS5 ~] # ll / etc/vsftpd/virtusers.db
-rw-r--r-- 1 root root 12288 Sep 16 03:51 / etc/vsftpd/virtusers.db
It is important to note that when you want to add a virtual user later, you only need to add the new user name and password to the virtual user list file in the format of "one-line username, one-line password". But this is not enough, it will not take effect! Also execute the command "db_load-T-t hash-f virtual user list file CentOS vsftpd virtual user database file. Db" to make it effective!
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.