HPUX nsswitch.conf issue

Hi all,

There wasn't nsswitch.conf file in my HPUX server. So I copied /etc/nsswitch.files to /etc/nsswitch.conf and changed the content like below.

passwd:       compat
group:        compat
hosts:        files dns [NOTFOUND=return] nis [NOTFOUND=return]
ipnodes:      dns [NOTFOUND=return] files
services:     nis [NOTFOUND=return] files
networks:     nis [NOTFOUND=return] files
protocols:    nis [NOTFOUND=return] files
rpc:          nis [NOTFOUND=return] files
publickey:    nis [NOTFOUND=return] files
netgroup:     nis [NOTFOUND=return] files
automount:    files nis
aliases:      files

After that resolving any host become very slow. When I ping to some host that's included in /etc/hosts, ping works after 2 mins. Please tell me what's wrong with my configuration.

---------- Post updated at 11:15 AM ---------- Previous update was at 11:14 AM ----------

Also If I remove /etc/nsswitch.conf file, everything works fine.

nsswitch.conf is very sensitive in HPUX. strange things can happen if this config is wrong because it does try to do lookup and resolutions, apart from slow logins have also seen other things like doing swinstall can also be affected.

First login to a few putty sessions as root.

Then try remove the dns. and see if it improves.

From:

hosts:        files dns

To:

hosts:        files

If you really having dns make sure you have resolvable name server entries in your /etc/resolv.conf

1 Like

Try working your way through the available options:

[notfound=continue]

1 Like