HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- dns hosts nsswitch question
Operating System - HP-UX
1834002
Members
1728
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2008 04:57 AM
05-20-2008 04:57 AM
i have a need to put some entries in a hosts file for local name resolution on an hpux 11.23 system
the problem is that entries in the hosts file dont seem to make a differance. they still wont resolve. i presume the issue is my nsswitch.conf is set to resolve names via dns then return if not found.
looking in sam it seems that the system is configured to use the hosts file.
| === Networking and Communications (hpux2) (1) |
|File View Options Actions Help |
|Name Service Switch |
|-------------------------------------------------------------------------------
| Type of First Second Third Fourth |
| Information Source Source Source Source |
|-------------------------------------------------------------------------------
| aliases /etc/aliases NIS |
| automount Local Files NIS |
| group /etc/group NIS |
| hosts DNS NIS /etc/hosts |
...
...
...
though i dont know where sam is getting this info. there is no nsswitch.conf in etc. only the following examples.
root@hpux2:$ls -l /etc/nssw*
-r--r--r-- 1 bin bin 566 Sep 3 2003 /etc/nsswitch.compat
-r--r--r-- 1 bin bin 391 Sep 3 2003 /etc/nsswitch.files
-r--r--r-- 1 bin bin 615 Sep 3 2003 /etc/nsswitch.hp_defaults
-r--r--r-- 1 bin bin 551 Sep 3 2003 /etc/nsswitch.nis
-r--r--r-- 1 bin bin 604 Sep 3 2003 /etc/nsswitch.nisplus
im fine with creating a /etc/nsswitch.conf via sam or via but im concerned about why there is no existing nsswitch.conf to start with.
I also have concerns about modifying the nsswitch.conf and wether a reboot will be required or not. ive seen mixed posts in the forums, some say a reboot is required, others say not.
could some kind expert please provide some insight?
many thanks in advance.
-mike
the problem is that entries in the hosts file dont seem to make a differance. they still wont resolve. i presume the issue is my nsswitch.conf is set to resolve names via dns then return if not found.
looking in sam it seems that the system is configured to use the hosts file.
| === Networking and Communications (hpux2) (1) |
|File View Options Actions Help |
|Name Service Switch |
|-------------------------------------------------------------------------------
| Type of First Second Third Fourth |
| Information Source Source Source Source |
|-------------------------------------------------------------------------------
| aliases /etc/aliases NIS |
| automount Local Files NIS |
| group /etc/group NIS |
| hosts DNS NIS /etc/hosts |
...
...
...
though i dont know where sam is getting this info. there is no nsswitch.conf in etc. only the following examples.
root@hpux2:$ls -l /etc/nssw*
-r--r--r-- 1 bin bin 566 Sep 3 2003 /etc/nsswitch.compat
-r--r--r-- 1 bin bin 391 Sep 3 2003 /etc/nsswitch.files
-r--r--r-- 1 bin bin 615 Sep 3 2003 /etc/nsswitch.hp_defaults
-r--r--r-- 1 bin bin 551 Sep 3 2003 /etc/nsswitch.nis
-r--r--r-- 1 bin bin 604 Sep 3 2003 /etc/nsswitch.nisplus
im fine with creating a /etc/nsswitch.conf via sam or via but im concerned about why there is no existing nsswitch.conf to start with.
I also have concerns about modifying the nsswitch.conf and wether a reboot will be required or not. ive seen mixed posts in the forums, some say a reboot is required, others say not.
could some kind expert please provide some insight?
many thanks in advance.
-mike
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2008 05:17 AM
05-20-2008 05:17 AM
Re: dns hosts nsswitch question
What SAM is showing is the default behavior if there is no nsswitch.conf file. If you want to override the name resolution order you have to create an nsswitch.conf file. The other nsswitch.conf..??? files are given as examples, they are ignored by the lookup service.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2008 05:20 AM
05-20-2008 05:20 AM
Solution
In the absence of an actual /etc/nsswitch.conf file, HP-UX will go with a set of defaults which you will find in the file /etc/nsswitch.hp_defaults (although editing this file won't change those defaults).
I'd copy /etc/nsswitch.hp_defaults to /etc/nsswitch.conf and edit as required. You shouldn't need a reboot for changes to take effect, although some applications will cache name lookups, so you might have to restart some processes.
HTH
Duncan
I am an HPE Employee
I'd copy /etc/nsswitch.hp_defaults to /etc/nsswitch.conf and edit as required. You shouldn't need a reboot for changes to take effect, although some applications will cache name lookups, so you might have to restart some processes.
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2008 05:41 AM
05-20-2008 05:41 AM
Re: dns hosts nsswitch question
thanks for the prompt and excellent answers
this is just what i was looking for
this is just what i was looking for
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP