VSFTPD Virtual User Management Guide

Source: Internet
Author: User
Keywords VSFTPD virtual user US user home directory
Tags db2 directory etc file guide home directory installed name

First we assume that you have installed the VSFTPD and have created the following 3 subdirectories under the/HOME/VSFTPD directory

Dbzh1
Dbzh2
Dbzh3

Below, we are going to build 3 virtual users, password is the username and then add "00"

Db1
Db2
Db3

Makes

User DB1 's home directory is DBZH1, and only read-only permissions are available under this directory
User DB2 's home directory is DBZH2, and only read-only permissions are available under this directory
User Db3 's home directory is DBZH3 and has all permissions under that directory

Create a text file Loguser.txt

The format is as follows:

user_id
Password&http://www.aliyun.com/zixun/aggregation/37954.html ">NBSP;

So, the contents of our/home/loguser.txt file are

Db1
db100
Db2
db200
Db3
db300

Building a Database

If you've never had a libdb4.6-util before or you don't know what to do, you'll need to execute the following command

sudo apt install db4.6-util

Then we execute

sudo db4.6_load-t-t hash-f/home/loguser.txt/etc/vsftpd_login.db

Finally set the access rights of the database file

sudo chmod 600/etc/vsftpd_login.db

Configuring Pam Files

Edit File/etc/pam.d/vsftpd.vu Add the following to the previous two lines of the original file:

Auth required/lib/security/pam_userdb.so Db=/etc/vsftpd_login
Account Required/lib/security/pam_userdb.so Db=/etc/vsftpd_login

The database Vsftpd_login we established in the previous step is used here

The virtual user we created will be validated using Pam, which is enabled by the statement pam_service_name=vsftpd.vu in the/etc/vsftpd.conf file, which you will discover later.

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.