Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Realization of vsftp Virtual user access by mysql

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Using MYSQL to realize VSFTP Virtual user access

1. Check whether to install the mysql installation package. If not, install it using yum.

2. Check whether to install the vsftpd package. If not, install it with yum.

3. Check whether the mysql and ftp services are self-booting. If not, use chkconfig to set them.

4. Log in to the database

5. Create the database name vsftp. Note that semicolons are used after the database name.

6. Use the database vsftp and create the ftpuser table

7. Check whether the created ftpuser has been successfully created.

8. Insert data name: yuri and kebo password: 123456 abcdef

9. Check to see if the insertion is successful. Now it has been inserted successfully.

10. Create a user ftpuser in mysql that is specially used to read virtual user information in the database

11. Use the newly created ftpuser login database

12. View the contents of the database and table you just created

13. Create locally mapped users and create and modify their home directory permissions

14. The download address for installing the PAM module that supports mysql authentication is as follows

Http://sourceforge.net/projects/pam-mysql/files/pam-mysql/0.7RC1/pam_mysql-0.7RC1.tar.gz/download

Extract it to / usr/src and compile and install it

15. Install the pam-devle package

After the installation is complete, you will see the following two files under / usr/lib/security, and link them to the / lib/security directory

16. Compile the pam authentication file / etc/pam.d/vsftpd, focus on the original content and add the following two lines to use mysql authentication. When entering, note that the password of the mysq database user ftpuser and the database name vsftp and table name ftpuser do not make mistakes.

User: the user name added to the login database

Passwd: password for the user name used

Host: the address of the database, such as an error in parsing when localhost may be accessed, resulting in login failure

127.0.0.1 is recommended

Db: is the database name

Table: is the table name

Restart mysql and vsftp services, turn off selinux and iptables firewall, and create a directory storage under / var/ftp/guest

18. Whether the test is successful or not indicates that the login is successful and you can view the existing files in it

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report