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