my /etc/resolv.conf
file is quite basic, something like:
# Generated by NetworkManager
domain subdomain.example.org
search subdomain.example.org
nameserver 192.0.2.100
nameserver 192.0.2.200
From what I understand, if I have a computer, say machine1.subdomain.example.org
, the search field allows me to access it only using its name machine1
. But Here's what I get:
$ ping machine1
ping: unknown host machine1
$ ping machine1.subdomain.example.org
PING machine1.subdomain.example.org (192.0.2.12) 56(84) bytes of data.
.../...
I'm on Debian wheezy, how can I make the search directive taken into account for name resolution? Is this a configurations issue? What parameters do I have to check?
EDIT:
Here's the content of /etc/nsswitch.conf
as requested:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis