Ftp virtual user

  
Computer shop news 1. Edit virtual account file, odd behavior user name, even behavior user password vi logins.txt s1 123 s2 456 2. Install db4-utils and other packages before using this command db_load -T -t hash -f Logins.txt /etc/vsftpd/vsftpd_login.db 3. View the file type file /etc/vsftpd/vsftpd_login.db 4. Modify the file permissions, set to be readable and writable by the administrator, other users do not have any permissions chmod 600 /etc /vsftpd/vsftpd_login.db ls -l /etc/vsftpd/vsftpd_login.db 5. Convenient authentication file vi /etc/pam.d/vsftpd.vu auth required /lib/security/pam_userdb.so db=/etc/vsftpd/Vsftpd_login account required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login 6. Add a user and set its home directory to /home/ftpsite useradd -d /home/ftpsite virtual 7. Modify the permissions of the ftpsite file Have read and write execution permission for the owner chmod 700 /home/ftpsite 8. Edit the /etc/vsftpd/vsftpd.conf configuration file, add the following options, the virtual user can log in, the mapped user name is virtual, and the authentication file should be written correctly. road Vi /etc/vsftpd/vsftpd.conf guest_enable=YES guest_username=virtual pam_service_name=/etc/vsftpd/vsftpd.vu 9. Set different permissions for different virtual users a. Edit the configuration file to add the following options user_config_dir=/etc/Vsftpd_user_conf #Set the virtual user's main configuration file storage path b. Create a virtual user configuration file save directory in the /etc directory mkdir /etc/vsftpd_user_conf c. Create different configuration files for different users. This file has the same name as the user. For example vi /etc/vsftpd_user_conf/s1 anon_world_readable_only=YES #This user does not have upload and download permissions, only browsing permissions vi /etc/vsftpd_user_conf/s2 anon_world_readable_only=NO anon_upload_enable=YES anon_mkdir_write_enable=YES anon_other_write_enable=YES 10. Via command line or client tool authenticating! ! ! !
Copyright © Windows knowledge All Rights Reserved