ubuntu下安装vftp 安装vsftpd提示530 Login incorrect

来源:互联网 发布:娜迦皇家卫兵知乎 编辑:程序博客网 时间:2024/05/06 10:56

安装vsftpd提示530 Login incorrect

今天想在我的电脑上面使用虚拟机测试wordpress,所以想使用vsftpd来搭建一个ftp服务器,方便文件传输,安装好之后修改配置文件为允许本地用户登录,禁止匿名用户登录

anonymous_enable=NO
Uncomment this to allow local users to log in.
local_enable=YES
Uncomment this to enable any form of FTP write command.
write_enable=YES 
但是使用ftp 命令登陆的时候总是提示如下的错误

root@server:~# ftp localhost
Connected to localhost.
220 (vsFTPd 2.3.5)
Name (localhost:root): ubuntu
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp> 221 Goodbye. 
于是我在网上搜了下看看大家都是怎么解决的,最后终于找到了解决的办法

sudo apt-get remove vsftpd
sudo rm /etc/pam.d/vsftpd
sudo apt-get install vsftpd 
这是因为ubuntu启用了PAM,所在用到vsftp时需要用到 /etc/pam.d/vsftpd 这个文件(默认源码安装的不会有这个文件),因此除了匿名用户外本地用户无法登录。所以只要删除了就可以了。

0 0