1833866 Members
2671 Online
110063 Solutions
New Discussion

Re: nsswitch.conf file

 
SOLVED
Go to solution
Joseph A. Starkey
Occasional Advisor

nsswitch.conf file

Hello

Do the other items in this file need to have any with it other then files?

passwd: files
group: files
hosts: files [NOTFOUND=continue] dns
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files
9 REPLIES 9
Mister_Z
Frequent Advisor

Re: nsswitch.conf file

Joseph,

given the nsswitch.conf file provided, the name resolution is first accomplished usign the file /etc/hosts. If the hosts to solve is not found then the request is resolved dynamically using DNS. The DNS client configuration resides in /etc/resolv.conf

Regards,
I work for HP
Steven E. Protter
Exalted Contributor
Solution

Re: nsswitch.conf file

Do the other items in this file need to have any with it other then files?

No. They should work just fine off of files.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Joseph A. Starkey
Occasional Advisor

Re: nsswitch.conf file

The reason I am doing this is bacause I am having errors in my rc.log file pertaining to swagentd and swconfig as follows:

Start Software Distributor agent daemon
Output from "/sbin/rc2.d/S100swagentd start":
----------------------------
ERROR: The 'swagentd' daemon started but the local hostname 'mhzfast1' cannot be resolved, therefore no SD commands will be able to contact it. The most likely solution is to define 'mhzfast1' in '/etc/hosts'.
"/sbin/rc2.d/S100swagentd start" FAILED

Configuring all unconfigured software filesets
Output from "/sbin/rc2.d/S120swconfig start":
----------------------------
ERROR: Cannot contact the 'swagentd' daemon because the local hostname 'mhzfast1' cannot be resolved, therefore no 'swconfig' or 'swremove' will be executed at this time'
The most likely solution is to define 'mhzfast1'in '/etc/hosts'.
"/sbin/rc2.d/S120swconfig start" FAILED

All is correct in my resolv.conf and my /etc/hosts file and I am able to to an nslookup with the correct respones back. Also my host name has not changed at all.

I was advised to create a nsswitch.conf file and have it look at that to ignore all the other stuff and just look locally. no my question is, is this all that is needed for this file or do I need to fill out the other parmenters.
Mister_Z
Frequent Advisor

Re: nsswitch.conf file

Joseph,

ensure the ip/hostname pair is included in the /etc/hosts file
I work for HP
Helen French
Honored Contributor

Re: nsswitch.conf file

Your nsswtich.conf file looks okay. With this settings, the system will look for /etc/hosts file during a name resolution and then if not found, it will look on DNS. Make sure you have your hostname (both short and full name) and IP address on /etc/hosts file, check you have the loop back address there and are not commeted out.
Life is a promise, fulfill it!
Michael Steele_2
Honored Contributor

Re: nsswitch.conf file

SD-UX depends upon networking to be up and properly configured. This entry "...hosts: files [NOTFOUND=continue] dns..." is fine.

What does nslookup say for both ip and hostname.

nslookup ip
nslookup hostname

Is the FQDN for the host in /etc/hosts and DNS? I.e., host@domain.com?

Also within /etc/hosts, what is loopback?
Support Fatherhood - Stop Family Law
John Dvorchak
Honored Contributor

Re: nsswitch.conf file

It looks to me like the S100swagent is trying to start before the network is up and running fully. What version of HPUX is this? Look in /sbin/rc2.d for the network startup files with an earlier startup order than you have with the swagentd file. I.E.
if your swagent file is S100swagentd then make sure your S???net file is a lower number. On my 11.x systems it is S3409 and the swagent file is S870swagentd which gives the network plenty of time to start before the swagentd daemon is started.
If it has wheels or a skirt, you can't afford it.
Raghu Kanth C.L
Advisor

Re: nsswitch.conf file

Check the Name resolution and once it is o.k restart the /sbin/init.d/swagent .
Hope this helps.
he who can does he who cannot, preaches
Greg OBarr
Regular Advisor

Re: nsswitch.conf file

Try putting both the hostname and the fully qualified domain name (FQDN) in the /etc/hosts file.

Ex:
xxx.xxx.xxx.xxx hostname
xxx.xxx.xxx.xxx hostname.domain.com