In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly gives you a brief introduction to the implementation of ftp to increase mysql user authentication methods. You can check the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, and we will go straight to the topic. I hope that this article can bring you some practical help to achieve ftp to increase mysql user authentication methods.
1. Install vsftpd, where you can install it with yum or source code
two。 To install mysql, skip it and check the previous documentation
3. Install pam-mysql, depending on the pam-devel package
[root@WebA-136 ~] # tar xf pam_mysql-0.7RC1.tar.gz
[root@WebA-136 ~] # yum install pam-devel
[root@WebA-136] #. / configure-- with-mysql=/usr/local/mysql-- with-openssl
[root@WebA-136] # make & & make install
[root@WebA-136 ~] # less README
[root@WebA-136 ~] # vim / etc/pam.d/vsftpd.mysql
[root@WebA-136 ~] # cat / etc/pam.d/vsftpd.mysql
[root@WebA-136 ~] # auth required / lib/security/pam_mysql.so user=vsftpd passwd=123456 host=192.168.146.136 db=vsftpd table=users usercolumn=name passwdcolumn=password crypt=3 md5=yes
[root@WebA-136 ~] # account required / lib/security/pam_mysql.so user=vsftpd passwd=123456 host=192.168.146.136 db=vsftpd table=users usercolumn=name passwdcolumn=password crypt=3 md5=yes
Reconfigure the database
Create database vsftp
Grant selcet on vsftp.* to vsftpd@192.168.146.136 identified by '123456'
Create a tabl
Create table users (
Id smallint auto_increment not null
Name char (20) binary not null
Password char (48) binary not null
Primary key (id))
View table structure
Desc users
Virtual users also need to be inserted here
INSERT INTO users (name,password) VALUES ('tom',md5 (123456)), (' jack',md5 (123456))
4. Modify the vsftpd.conf configuration file to make it suitable for mysql authentication
First create a user
Useradd-s / sbin/nologin-d / var/ftp-test vsftp
Chmod go+rx / var/ftp-test
Make sure the following options are turned on in vsftpd.conf
[root@WebA-136 ~] # vim / etc/vsftpd/vsftpd.conf
Anonymous_enable=YES
Local_enable=YES
Write_enable=YES
Anon_upload_enable=NO
Anon_mkdir_write_enable=NO
Chroot_local_user=YES
Add the following options
Guest_enable=YES
All virtual users of guest_username=vsftpd# must be mapped to a specified user.
Listen=YES
Pam_service_name=vsftpd.mysql
Note: different access permissions can be set according to different virtual users.
Add new in vsftpd.conf
User_config_dir=/etc/vsftpd/test
Add a file with the same name as the virtual user in the / etc/vsftpd/test directory
Cd / etc/vsftpd/test
Vim tom
Anon_upload_enable=YES
Anon_mkdir_write_enable=YES
Vim jack
Anon_upload_enable=NO
Anon_mkdir_write_enable=NO
To achieve ftp to increase mysql user authentication method will first tell you here, for other related issues you want to know can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.
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.