- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- nsswitch file usage 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
03-11-2002 09:46 AM
03-11-2002 09:46 AM
We??ve got some systems with nsswitch file on /etc and few more without it.
On the first group, if we delete nsswitch file, system works with some problems, slow telnet connections, CDE environment fails, slow Oracle responses, etc...
On the second group, all systems works fine without nsswitch.
Can anyone explain what??s the purpose of such file and why is needed on some systems and not in others?
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 09:50 AM
03-11-2002 09:50 AM
Re: nsswitch file usage question
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 09:53 AM
03-11-2002 09:53 AM
Re: nsswitch file usage question
If a nsswitch file is setup to look at the hosts file and then quit if it does not find an answer, you will never touch a DNS server. That is why the nsswitch file is important.
Post the contents of that file as well as the resolv.conf like Harry asked for.
GL,
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 09:54 AM
03-11-2002 09:54 AM
Re: nsswitch file usage question
works fine : check the method of hosts resolution
it should be something like hosts: files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=continue
This would typically tell you how hostname get resolved , First it looks for /etchosts file thne if it didnot find entry in hosts look for DNS .
Second you can look for /etc/resolv.conf file and check for search order and domain name.
Do you have DNS running in your env..??
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 10:09 AM
03-11-2002 10:09 AM
Re: nsswitch file usage question
Try this link below,
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=20020311-101557
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2002 10:21 AM
03-11-2002 10:21 AM
Re: nsswitch file usage question
(you remember those who came up with the yellow pages, what later turned into NIS => NIS+ owe to legal issues with British Telecom)
There should be a nice manpage installed on your system that explains its purpose well.
Although generally for many name services (e.g. DNS, NIS, LDAP?) it is also used (if present) by the resolver to decide the order in which to query either your DNS server or /etc/hosts.
To speed things up Files should be first (but only list loopback, hostname, node names of peer SG cluster nodes, and package names in /etc/hosts, nothing more), then let it query your DNS server.
Otherwise you can get nasty timeouts especially when DNS is not available.
The firewallers occasionally (unitentionally?) drop packets for port 53 ;-)
The syntax iof /etc/nsswitch.conf s thoroughly explained in the mentioned manpage.
type
man nsswitch.conf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2002 12:27 AM
03-12-2002 12:27 AM
Re: nsswitch file usage question
domain enyca.es
nameserver 192.168.1.100
/etc/nsswitch:
#
# /etc/nsswitch.conf
#
# This is the default configuration file for the name service switch.
# It will cause behavior similar to that performed on prior HP-UX
# releases when a configurable name service algorithm was not provided.
#
# If the /etc/nsswitch.conf file is not present, it will default to the
# behavior represented by the ordering and conditions below.
#
# See the Adminstering Internet Services Manual and the switch(4) man
# page for more information on the name service switch.
#
group: files nis dns
passwd: files[NOTFOUND=continue UNAVAIL=continue] nis [NOTFOUND=return UNAVAIL=continue TRAYAGAIN=return]
hosts: files [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=return] dns [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=return] nis
services: nis [NOTFOUND=return UNAVAIL=continue] files
networks: nis [NOTFOUND=return UNAVAIL=continue] files
aliases: dns
netgroup: nis [NOTFOUND=return UNAVAIL=continue] files
rpc: nis [NOTFOUND=return UNAVAIL=continue] files
protocols: nis [NOTFOUND=return UNAVAIL=continue] files
passwd: files
group: files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2002 06:31 AM
03-12-2002 06:31 AM
SolutionFirst, see man nsswitch.conf. It's got some good info.
There are a number of "databases" which are used (or could possibly be used) by the system. They contain information about hostnames, IP addresses, users, and a number of others. nsswitch.conf is used to specify which databases are searched and in what order.
For example, hostname to IP address resolution can be performed using /etc/hosts, DNS, NIS, or NIS+. If you don't use some of these, you shouldn't have them in nsswitch.conf.
According to the man page, by default, the OS uses the following to resolve IP addresses and hostnames:
hosts: nis [NOTFOUND=return] files
If nis is not in use, /etc/hosts will be checked (files means to use the standard configuration file on the local host). If nis is configured and nis does not find the entry being resolved, then resolution ends without consulting /etc/hosts.
So, from the info in the man page it can be determince that the system will work fine without nsswitch.conf IF nis is not used and the local configuration files contain all the info needed.
If you use NIS, NIS+, or DNS, you should create nsswitch.conf and modify it to suit your purposes. At the least, if using nis, you probably need to change [NOTFOUND=return] to [NOTFOUND=continue]. Alternatively, you may want to change the order so that files is before nis.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2002 06:38 AM
03-12-2002 06:38 AM
Re: nsswitch file usage question
hosts: files [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] dns
See what happens.
GL,
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2002 07:11 AM
03-12-2002 07:11 AM
Re: nsswitch file usage question
For a system which is self-contained, i.e. it is not a part of NIS or depends on system info from other systems , there would be no necessity for nsswitch.conf. But, most of the
unix systems out there are not stand-alone
pieces, so by default we have nsswitch.conf file to help the system routines know where it has to pick specific objects from.
for instance:
hosts -> this entry instructs where to look for host<->ip information from : DNS server, or local /etc/hosts file.
So each entry has a meaning. There are different versions of nsswitch.conf file based on the system you have. Look at
#ll /etc/nsswitch*
-r--r--r-- 1 bin bin 528 Nov 6 1997 /etc/nsswitch.compat
-r--r--r-- 1 root sys 377 Jan 5 2001 /etc/nsswitch.conf
-r--r--r-- 1 root sys 377 Jan 5 2001 /etc/nsswitch.conf.20010105
-r--r--r-- 1 bin bin 353 Nov 6 1997 /etc/nsswitch.files
-r--r--r-- 1 bin bin 555 Nov 6 1997 /etc/nsswitch.hp_defaults
-r--r--r-- 1 bin bin 513 Nov 6 1997 /etc/nsswitch.nis
-r--r--r-- 1 bin bin 566 Nov 6 1997 /etc/nsswitch.nisplus
There are different versions for nisplus systems, nis system , plain(files)system.
Based on the system you have, you just have to copy the file to /etc/nsswitch.conf
HTH
raj