Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

6.8. The /etc/nsswitch.conf file

The /etc/nsswitch.conf file is used to configure which services are to be used to determine information such as hostnames, password files, and group files. The last two ones, password files, and group files in our case are not used, since we don't use NIS services on our server. Thus, we will focus on the hosts line in this file.

Edit the nsswitch.conf file vi /etc/nsswitch.conf and change the hosts line to read:
          "hosts:      dns files"
          
Which means, for programs that want to resolve an address. They should use the dns feature first, and the /etc/hosts file if the DNS servers are not available or can't resolve the address.

Also, we would recommend deleting all instances of NIS services from each line of this file unless you are using NIS! The result should look like this:
            passwd:files
            shadow:files
            group:files
            hosts:dns files
            bootparams:files
            ethers:files
            netmasks:files
            networks:files
            protocols:files
            rpc:files
            services:files
            automount:files
            aliases:files           
          

 
 
  Published under the terms of the Open Publication License Design by Interspire