O que é o modo compat nsswitch?

9

A Red Hat me recomendou o modo compat em /etc/nsswitch.conf como uma das opções para enumerar usuários LDAP, mas depois disse que não é um método muito usado.

nsswitch.conf
passwd: files compat
passwd_compat: ldap

in passwd file, add +@netgroup.

O que é este modo compat?

    
por ujjain 19.08.2013 / 15:36

1 resposta

14

Este trecho foi tirado do livro incrível escrito pelo advogado Evi Nemeth do Linux (infelizmente, recentemente perdido no mar link ) em seu primeiro e melhor livro de administração do linux: Linux® Administration Handbook. Para este caso, foi na segunda edição do livro, eu não tenho certeza se isso foi duplicado na última quarta edição do livro, como naquela época é NIS e NIS + é menos relevante.

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.

    
por 19.08.2013 / 15:59