Configure virtual user logon in vsftp

Source: Internet
Author: User

1. Install vsftpd

1 yum install vsftpd -y

2. Rename the default configuration file for recovery

1 cp ftpusers ftpusers.bak2 cp user_list user_list.bak3 cp vsftpd.conf vsftpd.conf.bak

3. Create a virtual FTP account and database file

1 Vim/etc/vsftpd/vusers. List # Add account and password 2 ftpuser # One account 3 ftppass # One Line password 4 ftpuser25 ftppass2
1 db_load-T-t hash-F vusers. List vusers. DB # If not, choose to install a yum install db4-utils2 chmod 600/etc/vsftpd/vusers .*

4. Create the FTP root directory and the system account mapped to the virtual user

1 mkdir /var/ftproot2 useradd -d /var/ftproot -s /sbin/nologin virtual3 chmod 755 /var/ftroot

5. Create a virtual user authentication File

1 VI/etc/PAM. d/vsftp. VU # Add the following content 2 # % PAM-1.03 auth required pam_userdb.so DB =/etc/vsftpd/vusers4 account required pam_userdb.so DB =/etc/vsftpd/vusers

6. Finally, change the main configuration file.

1 Vim/etc/vsftpd. conf2 anonymous_enable = No # reject anonymous user logon 3 local_enable = yes # enable virtual login 4 write_enable = yes # Enable FTP write permission 5 anon_umask = 0226 guest_enable = yes # Allow virtual User Login 7 guest_username = Virtual # specify the ing username of the virtual user 8 pam_service_name = vsftp. VU # specify the authentication File

7. Restart the vsftpd service: Service vsftpd restart

Open a browser to test

User name: ftpuser or ftpuser2

Password: ftppass or ftppass2

Configure virtual user logon in vsftp

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.