Mailinglist Archive: opensuse (1165 mails)

< Previous Next >
Re: [opensuse] localhost unknown host
  • From: Dirk Gently <dirk.gently00@xxxxxxxxx>
  • Date: Fri, 02 Mar 2012 13:35:01 -0500
  • Message-id: <>
Philipp Thomas wrote:
On Thu, 01 Mar 2012 00:09:28 -0500, Dirk Gently
<dirk.gently00@xxxxxxxxx> wrote:

Why in the world would networking NOT check /etc/hosts?

Because of NSS. /etc/nsswitch.conf decides which resources are used to
resolve names and in which order. If the system is configured to not
consult /etc/hosts it won't. I will by default use it.

See "info '( Basics' " for a description of NSS.


This was already checked in an earlier post.

root@linux-c4zg:/etc> more nsswitch.conf
# /etc/nsswitch.conf
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
# Legal entries are:
# compat Use compatibility setup
# nisplus Use NIS+ (NIS version 3)
# nis Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# [NOTFOUND=return] Stop searching if not found so far
# For more information, please read the nsswitch.conf.5 manual page.

# passwd: files nis
# shadow: files nis
# group: files nis

passwd: compat files xos
group: compat files xos

# hosts: files mdns4_minimal [NOTFOUND=return] dns
hosts: files dns
networks: files dns

services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files nis
publickey: files

bootparams: files
automount: files nis
aliases: files

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups