- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- nsswitch.compat and nsswitch.conf (points!)
Operating System - HP-UX
1752328
Members
5342
Online
108786
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
Discussions
Discussions
Forums
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
тАО10-04-2010 04:23 AM
тАО10-04-2010 04:23 AM
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 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2010 04:39 AM
тАО10-04-2010 04:39 AM
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
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2010 03:58 PM
тАО10-04-2010 03:58 PM
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP