Operating System - HP-UX
1833187 Members
3112 Online
110051 Solutions
New Discussion

/etc/hosts instead dns in HP-UX 09.00

 
Roope Haapavaara
New Member

/etc/hosts instead dns in HP-UX 09.00

I deleted /etc/resolv.con file, but it's still not using my /etc/hosts file. Do I need to boot machine?

All I could ever find in manuals was "delete resolc.conf". It don't work. Patching OS is not an option.

Uname info: HP-UX oldhpux1 A.09.00 D 9000/897
9 REPLIES 9
Rob Galloway_1
Frequent Advisor

Re: /etc/hosts instead dns in HP-UX 09.00

Are you using NIS?
Are you running a name server on your local host (check for /etc/named.boot)?

Either of these will prevent resolution from ever reaching /etc/hosts.

Experience is a hard teacher. It tests first and teaches afterward.
Roope Haapavaara
New Member

Re: /etc/hosts instead dns in HP-UX 09.00

There is /etc/named.boot.

The question here is, that the DNS this "server" uses is to be shut down. This machine still has few old clients, thouhg. I thought /etc/hosts shouldbe enough, cause there really isn't too many.

I'm pretty lost without SAM as you can see :(
eran maor
Honored Contributor

Re: /etc/hosts instead dns in HP-UX 09.00

Hi

the default name resol for hp-ux is DNS .

modify the nsswitch.conf that he will look like this :

#
# /etc/nsswitch.files:
#
# 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
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files

this will tell him to go to resolv the host with the host file
love computers
Roope Haapavaara
New Member

Re: /etc/hosts instead dns in HP-UX 09.00

09.00 don't support nsswitch.conf without patching.
G. Vrijhoeven
Honored Contributor

Re: /etc/hosts instead dns in HP-UX 09.00

Hi,

I like to give it a shot. I must mention that i am not an UX9 expert.
Try hosts_to_named (man)it enables you to create name server file formats witch can be used by named.

Hope this will help,

Gideon
harry d brown jr
Honored Contributor

Re: /etc/hosts instead dns in HP-UX 09.00

I sure hope you don't use this machine for any kind of production work. You really ought to consider installing 10.20! HPux 9.00 is not usually y2k compliant, unless you patched the crap out of it.

live free or die
harry
Live Free or Die
Roope Haapavaara
New Member

Re: /etc/hosts instead dns in HP-UX 09.00

I renamed resolv.conf and named.boot and stopped named. Do I need named for something else?

Now it works anyway, thanks a lot ppl. I really appreciate your help.
Bill Hassell
Honored Contributor

Re: /etc/hosts instead dns in HP-UX 09.00

Be sure to edit /etc/rc so that a reboot does not startup named again. 9.x is very, very old and uses BIND and sendmail that are considered very unsecure by today's standards. If you don't need any email in/out of this system, turn off sendmail in rc also. Just to be safe, I would also turn off any unused services in /etc/inetd.conf too.


Bill Hassell, sysadmin