Operating System - HP-UX
1834586 Members
3605 Online
110069 Solutions
New Discussion

unknown host on hpux11.23

 
Trng
Super Advisor

unknown host on hpux11.23

Hi,

sometimes my machine hostname displaying as "unknown".i have cheked in /etc/hosts and netconf files.is thery any other file to check it ?..and what is this entry in rclog indicates

"/sbin/rc2.d/S367swconfig start":

----------------------------

* Turning off all network based resolving services in

'/etc/nsswitch.conf'

* Setting up temporary hostname in '/etc/hosts'

* Restoring '/etc/hosts' to its original contents.

* Removing the temporary '/etc/nsswitch.conf'


regards
skr

administrator
5 REPLIES 5
Johnson Punniyalingam
Honored Contributor

Re: unknown host on hpux11.23

yes pls check you "etc/nsswitch.conf'" file


The /etc/nsswitch.conf file is used to configure which services are to be used to determine information such as hostnames, password files, and group files. The last two ones, password files, and group files in our case are not used, since we don't use NIS services on our server. Thus, we will focus on the hosts line in this file.

Example :-

cat nsswitch.conf

#
# /etc/nsswitch.files:
#
# @(#)B11.23_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
passwd: files
group: files
hosts: files dns
ipnodes: files
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files
Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: unknown host on hpux11.23

If your are using DNS please change has below in the '/etc/nsswitch.conf'


hosts: files
to
hosts: files [NOTFOUND=continue] dns

Rds,
Johnson
Problems are common to all, but attitude makes the difference
Trng
Super Advisor

Re: unknown host on hpux11.23

in my machine no '/etc/nsswitch.conf' file ..

-r--r--r-- 1 bin bin 566 Sep 3 2003 nsswitch.compat
-r--r--r-- 1 bin bin 391 Sep 3 2003 nsswitch.files
-r--r--r-- 1 bin bin 615 Sep 3 2003 nsswitch.hp_defaults
-r--r--r-- 1 bin bin 481 Apr 8 2005 nsswitch.ldap
-r--r--r-- 1 bin bin 551 Sep 3 2003 nsswitch.nis
-r--r--r-- 1 bin bin 604 Sep 3 2003 nsswitch.nisplus

how to check which file is using first ??i dont have resolv.conf .
administrator
Johnson Punniyalingam
Honored Contributor

Re: unknown host on hpux11.23

Hi Trng,

you can try touch /etc/nsswitch.conf

touch /etc/nsswitch.conf

chown bin:bin /etc/nsswitch.conf

Please update the file has below .. and try.. :)

vi /etc/nsswitch.conf

# /etc/nsswitch.files:
#
# @(#)B11.23_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any name services.
#
passwd: files
group: files
hosts: files dns
ipnodes: files
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files

or need check with you. "swlist" --> did you get any error unknow "host"

swlist -l --> can please post the output

Thanks,
Best Regards,
Johnson
Problems are common to all, but attitude makes the difference
Trng
Super Advisor

Re: unknown host on hpux11.23

found /etc/hosts file was corrupted .corrected it.now it is fine.

rgds
skr
administrator