binary options strategy VSFTP MySQL virtual user configuration proc...
VSFTPD in a UNIX / Linux in very safe and quickly FTP server, has now been adopted by a lot of big sites. VSFTPD help the consumer title and password stored in the database file or database server. VSFTPD said this form of virtual end users for customers. In contrast to the local FTP (technique) consumers, the virtual FTP server consumers is only the exceptional people, virtual FTP server end users can only access the resources provided by this technique enormously increase their very own stability. Evaluating with the anonymous consumers, virtual consumers will require a username and password to entry the FTP server in the doc, an enhance of the consumer and obtain management. The need to offer obtain solutions, but do not hope that absolutely everyone can download anonymous, the two the will need for end users to obtain conduite, using into account the host safety and uncomplicated management of the FTP website, the virtual consumer is an excellent remedy. This paper describes the RedHat Linux 9 on how to VSFTPD virtual person identify and password saved in the MySQL database server.
1, VSFTPD set up
At present, VSFTPD the latest model is one.2. edition. Get the official address of the ftp//vsftpd.beasts.org/end users/cevans/vsftpd-1.2..tar.gz. Prior to putting in, the preparatory function neededfollowing
VSFTPD default configuration of the require to "nobody" consumer. In the method to add this consumer, if a consumer previously exists, useradd prompted a corresponding order.
root hpe45 root useradd no person
useradd consumer no one exists
VSFTPD default configuration of the need to have to "/ usr / share / empty" directory. In the program directory, if the directory by now exists, mkdir command corresponding suggestions.
root hpe45 root mkdir / usr / reveal / empty /
mkdir can not develop directory '/ usr / share / empty' File exists
VSFTPD give anonymous FTP providers, the need to have to "ftp" people and an powerful directory of anonymity.
root hpe45 root mkdir / var / ftp /
root hpe45 root useradd-d / var / ftp ftp
The up coming operation for ftp people are already there are practical.
root hpe45 root chown root.root / var / ftp
root hpe45 root chmod og-w / var / ftp
Much more preparatory operate is completed, we can commence compiling the supply code. We suppose that the get vsftpd-1.two..tar.gz in / root directory, the subsequent purchase
root hpe45 root tar zxvf vsftpd-one.two..tar.gz
root hpe45 root compact disk vsftpd-1.2.
root hpe45 vsftpd-one.2. make
root hpe45 vsftpd-1.2. make set up
Over the "make install" command will be compiled binary files, manuals and other duplicate to the appropriate directory. In RHL9, may well need to manually copy of the subsequent
root hpe45 vsftpd-1.2. cp vsftpd / usr / local / sbin / vsftpd
root hpe45 vsftpd-1.2. cp vsftpd.conf.5 / usr/neighborhood/reveal/man/man5
root hpe45 vsftpd-1.two. cp vsftpd.8 / usr/nearby/share/man/man8
Next, we copy a simple profile as a foundation for amending the again.
root hpe45 vsftpd-one.two. cp vsftpd.conf / and so forth
root hpe45 vsftpd-one.2. cp RedHat / vsftpd.pam / and many others / pam.d / ftp
PAM duplicate the file to let nearby consumers log VSFTPD.
root hpe45 vsftpd-1.2. cp RedHat / vsftpd.pam / and so forth / pam.d / ftp
2nd, create a guest consumer
VSFTPD use PAM virtual consumer authentication techniques. As the virtual person ID / password be held separate, so the validation, VSFTPD require binary options strategy for a process to read through the id of the person database file or database server to full the verification, which is VSFTPD the guest customers. This is as anonymous consumers also require a method like ftp people. Of class, we can also guest consumers as a virtual consumer in the system reps. Under in the technique include vsftpdguest consumers, as VSFTPD the visitor.
root hpe45 vsftpd-1.2. useradd vsftpdguest
When the virtual users log in, the site of the property for vsftpdguest directory / residence / vsftpdguest. If you want customers to log in to virtual / var / ftp, and other directories, modify their vsftpdguest the directory can be.
3rd, set up VSFTPD profile
In / and many others / vsftpd.conf doc, by incorporating the following selections
visitor_allow Indeed
visitor_username vsftpdguest
Then the subsequent order, VSFTPD operate in the history
root hpe45 vsftpd-1.two. / usr / community / sbin / vsftpd &
four, customers will be held in virtual MySQL database server
We develop up a database vsftpdvu, Table people, subject name and passwd used to shop virtual user's username and password, while two extra virtual customers xiaotong and xiaowang.
root hpe45 vsftpd-1.two. mysql-p
mysql produce database vsftpdvu
mysql use vsftpdvu
mysql make table end users (name char (16) binary, passwd char (16) binary)
mysql insert into end users (name, passwd) values ( 'xiaotong', password ( 'qqmywife'))
mysql insert into people (name, passwd) values ( 'xiaowang', password ( 'ttmywife'))
mysql quit
Then, licensed vsftpdguest vsftpdvu database can be read through the end users table. The following purchase
root hpe45 vsftpd-1.2. mysql-u root mysql-p
mysql grant pick out on vsftpdvu.end users to vsftpdguest localhost determined by 'i52serial0'
mysql give up
To verify the accomplishment of the operation just can conduct the subsequent purchase
root hpe45 vsftpd mysql-u vsftpdguest-pi52serial0 vsftpdvu
mysql choose * from customers
If productive, will be detailed xiaotong, xiaowang and encrypted password
5, setting the PAM authentication MySQL
The following we want to use a mysql pam authentication for the open up resource venture (http//sourceforge.web/tasks/pam-mysql/). Initial, from the site of its offer pam_myql-.5.tar.gz, copied to / root directory. In compiling the installation, to guarantee that the RPM mysql-devel bundle has been set up on your device, if not from the RHL set up disc to install the package. Then, the subsequent buy
root hpe45 root tar xvzf pam_mysql-.five.tar.gz
root hpe45 root compact disc pam_mysql
root hpe45 pam_mysql make
root hpe45 pam_mysql make set up
make set up this move may well be inappropriate, and that the directory had to manually created pam_mysql.o copied to the / lib / security directory.
Subsequent, we need to set up vsftpd PAM verify the files. Open up / and so forth / pam.d / ftp files, by including the following factors
auth needed pam_mysql.o person vsftpdguest passwd i52serial0 host localhost db vsftpdvu table end users usercolumn title passwdcolumn passwd crypt two
account expected pam_mysql.o person vsftpdguest passwd i52serial0 host localhost db vsftpdvu table customers usercolumn name passwdcolumn passwd crypt 2
Associated to the previously mentioned parameters, as lengthy as the corresponding set up in front of the database can understand their that means. It really should be mentioned that crypt parameters. crypt that password in the Password subject of encryption method crypt , passwords to communicate way (not encrypted) stored in the database crypt one, the use of passwords UNIX technique DES encryption encrypted stored in the database crypt two , Passwords soon after the pas MySQL