- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: /etc/nssswitch.conf file entry
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
Discussions
Discussions
Forums
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
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
тАО04-27-2010 11:48 AM
тАО04-27-2010 11:48 AM
/etc/nssswitch.conf file entry
I have a small concern in the entry for the /etc/nssswitch.conf file
In one of the server i am getting the entry as below :
-bash-2.05b$ more /etc/nsswitch.conf
hosts: files [NOTFOUND= continue] dns
so the meaning for this is for the hostname it needs to check first the /etc/hosts file, if the entry is not there, the checking continues to the dns server right?
pls let me know this..
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2010 12:02 PM
тАО04-27-2010 12:02 PM
Re: /etc/nssswitch.conf file entry
> so the meaning for this is for the hostname it needs to check first the /etc/hosts file, if the entry is not there, the checking continues to the dns server right?
Correct.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2010 04:46 PM
тАО04-27-2010 04:46 PM
Re: /etc/nssswitch.conf file entry
ipnodes: files [NOTFOUND= continue] dns
It might be that the apps using getaddrinfo() rather than gethostbyname() are getting a "default" behaviour. FWIW, any application being maintained or developed these days probably should be converted to getaddrinfo()/getnodeinfo() and stop using gethostbyname()/gethostbyaddr(). This would be one of the first steps for being IPv6 ready. I've also found getaddrinfo() to be more convenient even for IPv4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2010 07:20 PM
тАО04-27-2010 07:20 PM
Re: /etc/nssswitch.conf file entry
Your query and assumption is correct.
The file /etc/nsswitch* is used for ruling the name resolution procedure ( and there are other usage also).
The host is not available in files say /etc/hosts , it will go to cnfigured dns server.
Regards,
Sooraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2010 07:32 PM
тАО04-27-2010 07:32 PM
Re: /etc/nssswitch.conf file entry
*******************
Source Uses
files /etc/hosts, /etc/passwd, and so forth
nis NIS (YP)
nisplus NIS+
ldap LDAP Directory Server
dns Valid only for hosts, ipnodes; uses the Internet Domain Name Service.
and
Status Meaning
SUCCESS Requested database entry was found
UNAVAIL Source is not responding or corrupted
NOTFOUND Source responded "no such entry"
TRYAGAIN Source is busy, might respond to retries
Action Meaning
continue Try the next source in the list
return Return now
***********************
UNIX checks this file on how to get various information from various files.
BR,
Kapil+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 02:05 AM
тАО04-28-2010 02:05 AM
Re: /etc/nssswitch.conf file entry
hosts: files dns
This also, the same funtion i guess.
It will search it in /etc/hosts, if not found it will search it in DNS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2010 02:20 AM
тАО04-28-2010 02:20 AM
Re: /etc/nssswitch.conf file entry
Yes, it will check "/etc/hosts" and if it does not found the entry there, it will try dns.
Regards,