我发现我吧配置文件内的guest_enable,guest_name,注释掉后,重新启动服务,原来的虚拟用户仍然可以登录。为什么?
[root@Nortel vsftpd]# rpm -qa | grep vsftpd
vsftpd-2.0.1-2
[root@Nortel vsftpd]# pwd
/etc/vsftpd
[root@Nortel vsftpd]# ls
login.txt vsftpd.conf
[root@Nortel vsftpd]# more vsftpd.conf
# Standalone mode
listen=YES
# Access rights (username:anonymous)
no_anon_password=YES
local_enable=YES
anon_upload_enable=YES
anon_mkdir_write_enable=YES
write_enable=YES
chown_uploads=YES
chown_username=adong
anon_umask=022
#local_umask=022
# Security
connect_from_port_20=YES
hide_ids=YES
pasv_min_port=30000
pasv_max_port=30999
chroot_local_user=YES
# Performance
idle_session_timeout=120
data_connection_timeout=300
accept_timeout=60
connect_timeout=60
max_clients=200
max_per_ip=15
anon_max_rate=1500000000
#banner
ftpd_banner=Welcome to daidong's FTP server
#virtual user
#guest_enable=YES //虚拟用户被注释掉了
#guest_username=adong
#user_config_dir=/etc/vsftpd_user_conf
[root@Nortel vsftpd]# service vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]
[1]+ 已终止 vsftpd
[root@Nortel vsftpd]# ftp nortel.com
Connected to nortel.com (127.0.0.1).
220 Welcome to daidong's FTP server
Name (nortel.com:root): adong
331 Please specify the password.
Password:
230 Login successful. //虚拟用户成功登录?!!!
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
谁能解释一 下?
VSFTPD的人官方解释是:
guest_enable=YES
guest_username=virtual
The guest_enable is very important - it activates virtual users! And
guest_username says that all virtual users are mapped to the real user
"virtual" that we set up above. This will also determine where on the
filesystem the virtual users end up - the home directory of the user
"virtual", /home/ftpsite.