- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Name resolution question
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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-02-2011 11:35 PM
10-02-2011 11:35 PM
Hi all,
I want a system only resolves by files, so I have left "/etc/nsswitch.conf" as below:
hosts:files
When I nslookup as root , the behaviour is the expected: "Using /etc/hosts on: ...". But, when I try with another user it reads "/etc/resolv.conf", because it resolves by DNS, not by files as stated in "/etc/nsswitch.conf" . What can be the reason for this?
Regards,
Solved! Go to Solution.
- Tags:
- nslookup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2011 11:43 PM
10-02-2011 11:43 PM
Re: Name resolution question
Perhaps your /etc/nsswitch.conf is not readable by that user?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2011 11:56 PM
10-02-2011 11:56 PM
Re: Name resolution question
Hi,
Yes, it was not readable (600 permissions). What I did was rename "/etc/resolv.conf". Now "/etc/nsswitch.conf" is 444, but my question is: If user cannot read "/etc/nsswitch.conf" , why does it resolve by DNS and not by files?
Regards,
- Tags:
- Permission
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2011 02:49 AM
10-03-2011 02:49 AM
SolutionIf the process cannot read /etc/nsswitch.conf when it starts up, it uses HP-UX built-in defaults, which for IPv4 hostname resolution are: first DNS, then NIS, then files = /etc/hosts. If DNS or NIS reports that a host does not exist, next sources are not tried (i.e. [NOTFOUND=return] is in effect). This is documented in the nsswitch.conf man page.
For IPv6-aware processes on 11.23 and newer, the "ipnodes" line in /etc/nsswitch.conf is typically used instead of "hosts" - even for looking up IPv4 hostnames. The defaults for "ipnodes" omit NIS, but are otherwise identical to the defaults of "hosts".
At least on 11.23, the man page says: "The library functions contain compiled-in default entries that are used if the appropriate entry in nsswitch.conf is absent or syntactically incorrect" but in fact the defaults will also be used if /etc/nsswitch.conf is not readable for any reason.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2011 05:11 AM
10-03-2011 05:11 AM
Re: Name resolution question
Ok, thank you very much for your help !
Regards,