Skip to ContentSkip to Footer
Start of content
Online Expert Day - HPE Data Storage - Live Now
April 24/25 - Online Expert Day - HPE Data Storage - Live Now
Read more
Read more
- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- Networking
- >
- nsswitch.compat and nsswitch.conf (points!)
Networking
turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
-
-
Categories
- Topics
- Hybrid IT with Cloud
- Mobile & IoT
- IT for Data & Analytics
- Transformation
- Strategy and Technology
- Products
- Cloud
- Integrated Systems
- Networking
- Servers and Operating Systems
- Services
- Storage
- Company
- Events
- Partner Solutions and Certifications
- Welcome
- Welcome
- Announcements
- Tips and Tricks
- Feedback
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- Converged Data Center Infrastructure
- Digital Transformation
- Grounded in the Cloud
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- Networking
- OEM Solutions
- Servers: The Right Compute
- Telecom IQ
- Transforming IT
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Categories
-
Forums
-
Blogs
-
InformationEnglish
nsswitch.compat and nsswitch.conf (points!)
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-04-2010 04:23 AM
10-04-2010 04:23 AM
nsswitch.compat and nsswitch.conf (points!)
nsswitch.compat and nsswitch.conf (points!)
Hi folks,
I read in the following post (http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1286194069555+28353475&threadId=1233205), that name resolution "default behaviour" if there is no nsswitch.conf file can be seen in /etc/nsswitch.hp_defaults (and /etc/nsswitch.compat?).
So in fact, even if no nsswitch.conf file is present, name resolution via /etc/hosts will still work, e.g. using /usr/bin/nslookup on HP-UX 11.31. However, programs using gethostbyname() may be able to "accept" a certain IP address but *not* be able to resolve the hostname, even though it is present in /etc/hosts.
So what should I expect? Is it correct to assume that every HP-UX administrator will have an nsswitch.conf file anyway to ensure that programs relying on gethostbyname() will not fail?
Informed, helpful replies will be generously rewarded with points!
Thanks, Christian
I read in the following post (http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1286194069555+28353475&threadId=1233205), that name resolution "default behaviour" if there is no nsswitch.conf file can be seen in /etc/nsswitch.hp_defaults (and /etc/nsswitch.compat?).
So in fact, even if no nsswitch.conf file is present, name resolution via /etc/hosts will still work, e.g. using /usr/bin/nslookup on HP-UX 11.31. However, programs using gethostbyname() may be able to "accept" a certain IP address but *not* be able to resolve the hostname, even though it is present in /etc/hosts.
So what should I expect? Is it correct to assume that every HP-UX administrator will have an nsswitch.conf file anyway to ensure that programs relying on gethostbyname() will not fail?
Informed, helpful replies will be generously rewarded with points!
Thanks, Christian
Yeshua loves you!
2 REPLIES
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-04-2010 04:39 AM
10-04-2010 04:39 AM
Re: nsswitch.compat and nsswitch.conf (points!)
Re: nsswitch.compat and nsswitch.conf (points!)
Hi,
Default behaviour is to try dns then /etc/hosts after a timeout
if you have no reslov.conf, the dns will be try on 127.0.0.1
.
So my advise:
Define exactly what you want to happen on gethostbyname in /etc/nsswitch.conf
and if you want the use of dns, then define a /etc/resolv.conf
if you don't want dns resolution it is very important to define a nsswitch.conf
Default behaviour is to try dns then /etc/hosts after a timeout
if you have no reslov.conf, the dns will be try on 127.0.0.1
.
So my advise:
Define exactly what you want to happen on gethostbyname in /etc/nsswitch.conf
and if you want the use of dns, then define a /etc/resolv.conf
if you don't want dns resolution it is very important to define a nsswitch.conf
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-04-2010 03:58 PM
10-04-2010 03:58 PM
Re: nsswitch.compat and nsswitch.conf (points!)
Re: nsswitch.compat and nsswitch.conf (points!)
Keep in mind that nslookup is not known for its slavish adherence to an nsswitch file.
FWIW, gethostbyname()/gethostbyaddr() is very "old school" these days - applications should be written to use getaddrinfo()/getnodeinfo().
FWIW, gethostbyname()/gethostbyaddr() is very "old school" these days - applications should be written to use getaddrinfo()/getnodeinfo().
there is no rest for the wicked yet the virtuous have no pillows
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.
End of content
United States
Hewlett Packard Enterprise International
Communities
- Communities
- HPE Blogs and Forum
© Copyright 2018 Hewlett Packard Enterprise Development LP