普通用户永远ping不通hosts文件里的别名

wise_man 2013-11-10 10:07:54
RT
$ cat /etc/hosts
192.168.9.58 test1
$ ll /etc/hosts
-rw-r--r-- 1 root root 2103 Nov 9 21:02 /etc/hosts

1、使用root用户ping别名
[root@gg ~]# ping test1
PING test1 (192.168.9.58) 56(84) bytes of data.
64 bytes from test1 (192.168.9.58): icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from test1 (192.168.9.58): icmp_seq=2 ttl=64 time=0.020 ms
2、使用oracle用户
[oracle@gg ~]$ ping test1
---一直卡住。。。
3、使用oracle用户ping IP的话没问题
[oracle@gg ~]# ping 192.168.9.58
PING test1 (192.168.9.58) 56(84) bytes of data.
64 bytes from test1 (192.168.9.58): icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from test1 (192.168.9.58): icmp_seq=2 ttl=64 time=0.020 ms

就这样,很蛋疼的一件事,求解啊!!

...全文
279 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ithiker 2013-11-13
  • 打赏
  • 举报
回复
权限的问题,看看hosts文件对oracle用户的权限是什么
aiirii 2013-11-13
  • 打赏
  • 举报
回复
vi /etc/nsswitch.conf 检查 hosts: files dns 如果不是,修改成如上
践行见远 2013-11-11
  • 打赏
  • 举报
回复
你登入oracle账户能打开hosts文件吗? 在我系统中正常可以访问……

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧