Chinaunix

标题: opensolaris下ldap和DNS冲突? [打印本页]

作者: jklyekai    时间: 2009-05-06 14:44
标题: opensolaris下ldap和DNS冲突?
opensolaris下最近需要运行ldap,而经常导致连WWW.SINA.COM.CN都ping不了,但是可以ping sina的IP地址,后来查看了一下原来是我的hosts这的files dns 的解析顺序被ldap用户占用;于是我在这个前面增加了dns
#
# /etc/nsswitch.ldap:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses LDAP in conjunction with files.
#


# the following two lines obviate the "+" entry in /etc/passwd and /etc/group.
passwd:     files ldap
group:      files ldap

# consult /etc "files" only if ldap is down.
hosts:      dns ldap  [NOTFOUND=return] files

# Note that IPv4 addresses are searched for in all of the ipnodes databases
# before searching the hosts databases.
ipnodes:    ldap [NOTFOUND=return] files

networks:   ldap [NOTFOUND=return] files
protocols:  ldap [NOTFOUND=return] files
rpc:        ldap [NOTFOUND=return] files
。。。。。

然后我在root权限下把这个/etc/nsswitch.conf的文件设置为444的权限,但是还是出现这个文件又被改写。
请问高手如何处理啊?
谢谢
作者: llzqq    时间: 2009-05-10 17:20
应该是编辑nsswitch.conf文件

# vi /etc/nsswitch.conf
把这一行:
hosts   files
改为:
hosts   files dns

[ 本帖最后由 llzqq 于 2009-5-10 17:21 编辑 ]
作者: kns1024wh    时间: 2009-05-11 13:36
标题: 回复 #1 jklyekai 的帖子
dns 或则ldap 只能使用同时使用一个




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2