LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1039|回复: 3

如何让smbclinet -L <hostname>识别hostname是网内/外主机

[复制链接]
发表于 2004-2-27 16:44:55 | 显示全部楼层 |阅读模式
如果局域网内有台主机名和Internet上一台主机名同名,如同为candy
访问candy (系统为Windows) 的共享资源时,如下:

# smbclient -L candy
Error connecting to 65.61.129.128 (拒绝连接)
Connection to candy failed

# nmblookup candy
querying candy on 192.168.0.255
192.168.0.144 candy<00>

# echo -e "192.168.0.144 \t candy \t candy" >> /etc/hosts
还是不行

Could you help me??Thank you very much!
发表于 2004-2-27 20:37:52 | 显示全部楼层
看一下/etc/nsswitch.conf
hosts:   files dns
应该就可以了。
 楼主| 发表于 2004-2-28 00:32:10 | 显示全部楼层
还是不行啊
# cat /etc/nsswitch.conf |grep ^hosts
hosts:      dns files

# cat /etc/host.conf
order hosts,bind
 楼主| 发表于 2004-2-28 00:35:13 | 显示全部楼层
不好意思,写错了
# cat /etc/nsswitch.conf |grep ^hosts
hosts: files dns

# cat /etc/host.conf
order hosts,bind
还是不行
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表