Experiment of VSFTPD server based on virtual user under CentOS 5.x

Source: Internet
Author: User
Tags auth centos

Required Requirements:

Virtual users who are real, but cannot log in

FTP1 VFTP1

FTP2 VFTP2

VIP VVIP

VFTP1: can only download

VFTP2: can only upload

VVIP: That can upload and can download

Start the implementation step below:

Install the required software

Yum-y Install vsftpd DB4 db4-devel

First, create a user database

1. Create a user text file----> create three accounts

Vi/etc/vsftpd/ftpvuser.txt

Add three virtual accounts in it, one person user and password each line

Such as:

VFTP1---Users

VFTP1PW---vftp1 password

2. Build the database (to install the DB4 and Db4-devel packages beforehand)

Db_load-t-T Hash-f/etc/vsftpd/ftpvuser.txt/etc/vsftpd/vu.db

3. Modify database File access rights

chmod 600/etc/vsftpd/vu.db

Second, configure Pam file

Vi/etc/pam.d/vsftpd

The default configuration is all commented out or deleted, add two rows of corresponding configuration fields

Auth required/lib/security/pam_userdb.so Db=/etc/vsftpd/vu

Account Required/lib/security/pam_userdb.so Db=/etc/vsftpd/vu

PS: The above is 32-bit writing, the following is the 64-bit system:

Auth required/lib64/security/pam_userdb.so Db=/etc/vsftpd/vu

Account Required/lib64/security/pam_userdb.so Db=/etc/vsftpd/vu

Related Article

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.