Likewise-Open

“確保本地在 nsswitch 中綁定之前出現”是什麼意思?

  • February 7, 2011
Joining to AD Domain:   *******
With Computer DNS Name: (null)


Error: Required configuration stage not enabled [code 0x0000a606]

The configuration of module 'set computer hostname' is required. Please either allow this configuration stage to be performed automatically (by passing '--enable hostname'), or
manually perform these configuration steps and rerun the domain join:

The following step(s) are required:
   Give the machine a fully-qualified domain name. If performed automatically, the fqdn will be set through /etc/hosts to 'proj.users.campus', but it is possible to use a
   different fqdn and/or set it through dns instead of /etc/hosts. However in all cases, the fqdn must follow standard DNS naming conventions, and have a period in the name.
   The following steps will be used if the fqdn is set automatically:
       * Make sure local comes before bind in nsswitch
       * Add a loopback entry in /etc/hosts and put the fqdn as the primary name

我想我已經解決了第二個錯誤。不過我不明白第一個。

確保本地在 nsswitch 中的綁定之前出現是什麼意思?

確保本地在 nsswitch 中的綁定之前出現是什麼意思?

在 /etc/nsswitch.conf 中的“host: ..”行中的 dns 之前的文件。例子:

Correct
hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4  

Not correct
hosts:          dns files 

我認為這意味著在 /etc/nsswitch.conf 文件中,控制 DNS 源的行應該在任何其他命名源(如 bind)之前引導名稱查找來自本地文件

所以你應該有這樣的一行

hosts:          files dns mdns4_minimal

而不是這個

hosts:          dns files mdns4_minimal

引用自:https://serverfault.com/questions/232309