3

Accidently I corrupted my nsswithch.conf file and now my hosts are not working. How can I restore or recreate it?

Joynal
  • 33

1 Answers1

4

This file is relatively generic, I would copy it from a working system of the same Ubuntu release

This should at least get you going - it's the default from xenial and should work regardless on pretty much any version.

# /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
gshadow:        files

hosts:          files dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files
netgroup:       nis