当前位置: 技术问答>linux和unix
Fedora 5 配置VSFTP 虚拟帐号失败,求解!
来源: 互联网 发布时间:2016-05-19
本文导语: 建立一个/etc/vsftpd/vuser 文件夹,权限777 在这个文件夹里面建立vuser.txt文件,内容为: zhubenwuzui 123456 234446552 123456 执行命令: db_load -T -t hash -f /etc/vsftpd/vuser/vuser.txt /etc/vsftpd/vuser/vuser.db 生成vuser.db文件 修改vuser.db...
建立一个/etc/vsftpd/vuser 文件夹,权限777
在这个文件夹里面建立vuser.txt文件,内容为:
zhubenwuzui
123456
234446552
123456
执行命令:
db_load -T -t hash -f /etc/vsftpd/vuser/vuser.txt /etc/vsftpd/vuser/vuser.db
生成vuser.db文件
修改vuser.db文件权限为700
然后创建虚拟帐户对应的系统帐户vuser
执行以下命令:
useradd vuser -p 1234566
chmod 775 /home/vuser
vsftpd.conf文件内容:
anonymous_enable=NO
local_enable=YES
write_enable=YES
anon_other_write_enable=YES
local_umask=000
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=lida
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=120
ftpd_banner=Welcome to lida's ftp server
pam_service_name=vsftpd
userlist_enable=YES
listen=YES
tcp_wrappers=YES
guest_enable=YES
guest_username=vuser
pam_service_name=vsftpd
然后重启 vsftpd
登录时使用虚拟帐号列表里的帐号登录出现密码错误,无法登录
[root@LIDA-Fedora2 ~]# ftp 192.168.31.39
Connected to 192.168.31.39.
220 Welcome to lida's ftp server
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (192.168.31.39:root): zhubenwuzui
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
在这个文件夹里面建立vuser.txt文件,内容为:
zhubenwuzui
123456
234446552
123456
执行命令:
db_load -T -t hash -f /etc/vsftpd/vuser/vuser.txt /etc/vsftpd/vuser/vuser.db
生成vuser.db文件
修改vuser.db文件权限为700
然后创建虚拟帐户对应的系统帐户vuser
执行以下命令:
useradd vuser -p 1234566
chmod 775 /home/vuser
vsftpd.conf文件内容:
anonymous_enable=NO
local_enable=YES
write_enable=YES
anon_other_write_enable=YES
local_umask=000
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=lida
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=120
ftpd_banner=Welcome to lida's ftp server
pam_service_name=vsftpd
userlist_enable=YES
listen=YES
tcp_wrappers=YES
guest_enable=YES
guest_username=vuser
pam_service_name=vsftpd
然后重启 vsftpd
登录时使用虚拟帐号列表里的帐号登录出现密码错误,无法登录
[root@LIDA-Fedora2 ~]# ftp 192.168.31.39
Connected to 192.168.31.39.
220 Welcome to lida's ftp server
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (192.168.31.39:root): zhubenwuzui
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
|
auth required /lib/security/pam_userdb.so db=/绝对路径
account required /lib/security/pam_userdb.so db=/绝对路径
就这样就可以了
account required /lib/security/pam_userdb.so db=/绝对路径
就这样就可以了