Virtual users who create vsftp servers in linux

Source: Internet
Author: User
In linux, the virtual user who creates a vsftp server-general Linux technology-Linux technology and application information. For more information, see the following. 1. Install the db4-utils-4 .. 29-10.e15.i386.rpm package (available on the second disc)
Rpm-ivh db4-utils-4 .. 29-10.e15.i386.rpm

2. Create an account and password for storing virtual users (odd behavior accounts and even behavior passwords)
Vim virtual.txt

3. generate an account database in db format recognized by pam (generate a login. db database)
Db_load-T-t hash-f/etc/vsftpd/virtual.txt login. db

4. For the sake of security, change the database file to be read and written only by root.
Chmod 700 login. db

5. Create a testpam file under the/etc/pam. d directory (this file is used for pam Authentication and can be written as needed)
Vim/etc/pam. d/testpam

6. Add the following two commands to the testpam file (Database login should not contain suffix. db)
Auth required/lib/security/pam_userdb.so db =/etc/vsftpd/login
Account required/lib/security/pam_userdb.so db =/etc/vsftpd/login

7. Create a local user. Because you want to map the virtual user to this local user, this user sets it as not logged on.
Useradd-d/home/xuni-s/sbin/nologin xuni

8. Configure the vsftpd main file/etc/vsftpd. conf, and add the following two commands.
Guest_enable = YES
Guest_username = xuni

9. Restart the vsftp service.
/Etc/init. d/vsftpd restart

10. Success !!!
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.