加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

redhat – 什么是nsswitch compat模式?

发布时间:2020-12-13 18:24:17 所属栏目:Linux 来源:网络整理
导读:Red Hat建议我在/etc/nsswitch.conf中使用compat模式作为枚举LDAP用户的选项之一,但后来说它不是一个常用的方法. nsswitch.confpasswd: files compatpasswd_compat: ldapin passwd file,add +@netgroup. 什么是这种比较模式? 解决方法 这篇摘录摘自Linux倡
Red Hat建议我在/etc/nsswitch.conf中使用compat模式作为枚举LDAP用户的选项之一,但后来说它不是一个常用的方法.
nsswitch.conf
passwd: files compat
passwd_compat: ldap

in passwd file,add +@netgroup.

什么是这种比较模式?

解决方法

这篇摘录摘自Linux倡导者Evi Nemeth(不幸的是最近在海上失败了 http://www.theregister.co.uk/2013/07/05/evi_nemeth_unix_dead/)写的第一本也是最好的Linux管理书之一:Linux?Administration手册.对于这种情况,它出现在本书的第二版中,我不确定这本书的最新版本是否重复,因为当时的NIS和NIS不太相关.

Configuration information can be distributed in several ways. Every
system understands flat files and knows how to use DNS to look up
hostnames and Internet addresses. Most also understand NIS. Since a
given piece of information could come from several potential sources,
Linux provides a way for you to specify the sources that are to be
checked and the order in which the checks are made.

In the original (pre-Linux) implementation of NIS,some configuration
files (the /etc/passwd and /etc/group files in particular) had to be
configured to “invite in” the contents of the corresponding NIS maps.
The invitation was extended by inclusion of special incantations in
the files themselves. A lone “+” at the beginning of a line would
include the entire NIS map,“+@netgroup” would include only entries
relevant to a given netgroup,and “+name” would include a single
entry.

This approach was never very well liked,and it has been superseded by
a central config file,/etc/nsswitch.conf,that allows an explicit
search path to be specified for each type of administrative
information. The original behavior can be emulated by use of a
compatibility mode,but it’s unlikely you would want to use this
feature on a newly configured network. (Unfortunately,emulation is
most distributions’ default.)

The common sources are nis,nisplus,files,dns,and compat; they refer to NIS,NIS+,[5] vanilla flat files (ignoring tokens such as “+”),DNS,and NISified flat files (honoring “+”),respectively.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读