解决ubuntu下ftp登录错误:do_ypcall: clnt_call: RPC: Unable to send; errno = Network is unreachable

来源:互联网 发布:matlab数组写入excel 编辑:程序博客网 时间:2024/06/03 13:33

Ubuntu 12.04上安装了vsftpd,但使用user 和password登录,不成功,显示只有匿名模式;

打开了/etc/vsftpd.conf, 修改为:

anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES


重新启动vsftpd 服务

sudo service vsftpd restart


再次登录,报错:

$ ftp 127.0.0.1
Connected to 127.0.0.1.
220 (vsFTPd 2.3.5)
Name (127.0.0.1:windriver): wind
331 Please specify the password.
Password:
do_ypcall: clnt_call: RPC: Unable to send; errno = Network is unreachable
Login failed.
Remote system type is Login.

查阅资料之后应该是与安装的NIS服务有冲突,参考:http://bbs.chinaunix.net/thread-1944614-1-1.html

于是修改/etc/nsswitch.conf, 如下:

passwd:         files nis
group:             files nis
shadow:         files nis


再次重启vsftpd和autofs服务,登录成功。

原创粉丝点击