VSFTPD virtual users in RHEL5

Source: Internet
Author: User
Vsftpd virtual user 1, start to configure 1, package yuminstall-yvsftpddb4-utils2, create a ing virtual user real user, is so the virtual user login with this identity, the system does not need to log on to this user. Therefore, it is safer to set the shell to/sbin/nologin as useradd-d/var/ftp/vuserdir-s/sbin/nologinvuser3.

Virtual users of vsftpd

1. Start Configuration

1. Pack

Yum install-y vsftpd db4-utils

2. Create a real user mapped to a virtual user, that is, the virtual user logs in with this identity, and the system does not need to log in with this user, therefore, it is safer to set shell to/sbin/nologin.

Useradd-d/var/ftp/vuserdir-s/sbin/nologin vuser

3. modify the configuration file of vsftpd

Vim/etc/vsftpd. conf

Add

Guest_enable = YES // enable the virtual User Function

Guest_username = vuser // The ing User Name

Anon_world_readable_only = NO // download allowed

Modify

Pam_service_name = vsftpd. vuser

Ii. Generate virtual User Files

Vim/etc/vsftpd/vftpuser.txt

A

1

B

2

C

3

Among them, there are odd behavior usernames and even behavior passwords.

Generate virtual user data files

Db_loal-T-t hash-f/etc/vsftpd/vftpuser.txt/etc/vsftpd. db

Chmod 600/etc/vsftpd. vftpuser. db // Modify permissions

It is best to delete the vftpuser.txt file.

Rm-f/etc/vsftpd/vftpuser.txt

3. Create a pam Authentication Program

Vim/etc/pam. d/vsftpd. vuser

Auth required/lib/security/pam_userdb.so db =/etc/vsftpd/vftpuser

Account required/lib/security/pam_userdb.so db =/etc/vsftpd/vftpuser

4. Restart the service.

Service vsftpd restart

5. Test

The user name is a and the password is 1

Username: B password: 2

Username: c password: 3

You can log on. Successful

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.