- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- NSSWITCH.CONF service file clarification
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
02-06-2002 08:52 AM
02-06-2002 08:52 AM
1. In the nsswitch file - do do need all default 11 entries or can this file be trimmed down to say just
passwd and group name services?
2. According to the man pages for nsswitch.conf:
For each status code, two actions are possible:
Action Meaning
continue Try the next source in the list
return Return now
EG. The policy "nis [NOTFOUND=return] files" implies "if nis is UNAVAIL, continue on to files, and if nis returns NOTFOUND, return to the caller; in other words, treat nis as the authoritative source of information and try files only if nis is down."
But the HP Instant Info, Installing and Admin of NFS Services, Chptr 6 - Configuring the Name service Switch says:
Action Meaning
continue Try the next name service in the list
return End the lookup and return control to the calling process without consulting the next name service in the list.
So which is it ??? Does the following entry:
hosts: nis [NOTFOUND=return] dns [NOTFOUND=return] files
abort if nis not found or continue the lookup to dns and if not found then look at files?
Norm Dignar
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2002 09:02 AM
02-06-2002 09:02 AM
Re: NSSWITCH.CONF service file clarification
As far as I know this file contains a configuration that will cause for example
hosts: nis [NOTFOUND=continue] files
This measns hosts to use NIS first then /etc/hosts, if NIS is either not up and running, or does not contain any answer in the NIS maps It's checkes the entries sequentially. If First entry doesn't give the answer then look for next entry.
Your nsswitch.conf file may contain only the services you needed.
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2002 09:14 AM
02-06-2002 09:14 AM
Re: NSSWITCH.CONF service file clarification
abort if nis not found or continue the lookup to dns and if not found then look at files?
If NIS returns "NOTFOUND" the lookup returns to the caller. If NIS for example is UNAVAILABLE (when nis is not available) or when it is busy (TRYAGAIN) the lookup will continue with DNS and if that returns a code any other than NOTFOUND it continues onward with files.
HtH,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2002 09:14 AM
02-06-2002 09:14 AM
Re: NSSWITCH.CONF service file clarification
To answer to your first question, you can trim down the nsswitch.conf file o include only those entries you want.
To the second question, the behavior is controlled by the policy. There are four parameters involved with each lookup option in an entry. They are "SUCCESS", "NOTFOUND", "UNAVAIL" & "TRYAGAIN". Try these two links for more info,
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90685/B2355-90685_top.html&con=/hpux/onlinedocs/B2355-90685/00/00/8-con.html&toc=/hpux/onlinedocs/B2355-90685/00/00/8-toc.html&searchterms=nsswitch.conf&queryid=20020206-091735
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B1031-90048/B1031-90048_top.html&con=/hpux/onlinedocs/B1031-90048/00/00/35-con.html&toc=/hpux/onlinedocs/B1031-90048/00/00/35-toc.html&searchterms=nsswitch.conf&queryid=20020206-091916
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2002 09:16 AM
02-06-2002 09:16 AM
SolutionRemember that the default action is to "continue" unless otherwise specified. Don't confuse the "UNAVAILable" status which means "not responding" with the "NOTFOUND" status which is a positive response meaning "no such entry".
The man pages note that the default criteria are to 'continue' on anything except SUCCESS; in other words, [SUCCESS=return NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue].
Thus your entry:
hosts: nis [NOTFOUND=return] dns [NOTFOUND=return] files
...would skip 'nis' and 'dns' if they were not not configured and proceed to examine /etc/hosts. If, however, 'dns' was configured, but not providing a response, then /etc/hosts would be consulted. If 'dns' responded "no such entity", then that would be the definitive answer and control would return to the caller without looking at /etc/hosts.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2002 10:30 AM
02-06-2002 10:30 AM
Re: NSSWITCH.CONF service file clarification
The nsswitch.conf file is a configuration file for NSS-library on HP-UX.
You can find out a default NSS behavior (if there is no nsswitch.conf file in /etc) of your current HP-UX version by referencing /etc/nsswitch.hp_default file. There are several sample NSS configuration files in /etc named nsswitch.files, nsswitch.nis etc. You can use one of them as a template for the nsswitch.conf according to your requirements.
BR,
DGS.