FreeBSD5.3 + VSFTPD + PAM Virtual User Settings

xiaoxiao2021-03-06  43

This article describes the VSFTP virtual user settings under FreeBSD 5.3. Since the network environment is not very large, there is no other database, but use ChPWDFile to generate a user database file directly. Add a virtual user ftpuser with adduser, install vsftpd in Ports

/usr/local/etc/vsftpd.conf configuration: anonymous_enable = YESanon_root = / home / FTProot / pub / anon_world_readable_only = NOanon_upload_enable = NOanon_mkdir_write_enable = NOanon_other_write_enable = NO

Local_enable = YESLOCAL_ROOT = / home / ftproot / write_enable = noidle_session_timeout = 60

Chroot_local_user = yesguest_enable = yesguest_username = ftpuserpam_service_name = vsftpduser_config_dir = / usr / local / etc / vsftpd_user_conf

# Performance_configmax_clients = 50max_per_ip = 2anon_max_rate = 30720

DirMessage_enable = yesxferlog_enable = yesconnect_from_port_20 = yes

FTPD_BANNER = Welcome to it @ any ftp service.

SECURE_CHROOT_DIR = / usr / local / share / vsftpd / EMPTY

Generate vsftpd.pwd with chpwdfile to / usr / local / etc /, this is a virtual user's username and password file: USR: MVORTGCGXOOEOADMINISTRATOR: CRPNA8C1K70ZM Detailed command See man, chpwdfile needs to install in Ports

/us/local/etc/pam.d/vsftpd configured as follows, specify the related parameters of the PAM: auth request pam_pwdfile.so pwdfile /usr/locount required PAM_LOGIN_ACCESS.SO where PAM_PWDFILE.SO needs to be installed in Ports

/ usr / local / etc / vsftpd_user_conf / usr: anon_world_readable_only = yeswrite_enable = noanon_upload_enable = noanon_mkdir_write_enable = noanon_max_rate = 102400max_per_ip = 2 This is the configuration of ordinary user accounts

/ Usr / local / etc / vsftpd_user_conf / administrator: anon_world_readable_only = NOwrite_enable = YESanon_upload_enable = YESanon_mkdir_write_enable = YESanon_other_write_enable = YESanon_max_rate = 5120000 This is the administrator account configuration

转载请注明原文地址:https://www.9cbs.com/read-69424.html

New Post(0)