Operating System - HP-UX
1833059 Members
2716 Online
110049 Solutions
New Discussion

Re: changing the hostname in HP UX

 
murali_20
Occasional Advisor

changing the hostname in HP UX

Hi All,
How can I change hostname in Hp-UX 11.11?
I want that to be updated in our DNS server.
Currently I am able to change the hostname by using "/sbin/set_params initial", but I am not able to ping the machine by hostname (on the machine the hostname gives out the new hostname).

Can you please help us in setting up a new hostname which can be resolved by the DNS server.

Thanks in advance.
11 REPLIES 11
Biswajit Tripathy
Honored Contributor

Re: changing the hostname in HP UX

Best way to change hostname would be by using
SAM (Run sam and you should be able to change
hostname in networking area).

To add your new hostname to DNS server, you
need to talk to the DNS server adminstrator
who should update the DNS database.

- Biswajit
:-)
Pete Randall
Outstanding Contributor

Re: changing the hostname in HP UX

You have to update the DNS server. There is nothing you can do on the target machine that is going to update the DNS server. You have to access the DNS server directly and update it.


Pete

Pete
Shyjith P K
Frequent Advisor

Re: changing the hostname in HP UX

Hi Murali,

Are you trying to ping from a different machine?
Can you try to give "nslookup " command from that machine. If it is not resolving the hostname, you have to register the new hostname in the DNS server.

Thanks!
Shyjith
murali_20
Occasional Advisor

Re: changing the hostname in HP UX

# nslookup ejmhpux
Name Server: abx.xyz.com
Address: xyz.ab.cd.ef
(thi is the correct DNS server IP which I cannot disclose here; so ....)

Trying DNS
Name: ejmhpux.xyz.com

looking up FILES
Name: ejmhpux
Address: 165.33.35.215

But still I am not able to resolve the machine by IP address
murali_20
Occasional Advisor

Re: changing the hostname in HP UX

# nslookup ejmhpux
Name Server: abx.xyz.com
Address: xyz.ab.cd.ef
(thi is the correct DNS server IP which I cannot disclose here; so ....)

Trying DNS
Name: ejmhpux.xyz.com

looking up FILES
Name: ejmhpux
Address: 165.33.35.215

But still I am not able to resolve the machine by hostname
Muthukumar_5
Honored Contributor

Re: changing the hostname in HP UX

To check it with nsquery to know the dns resolvation use as,

# nsquery hosts "dns"

If the resolvation to IP-Address is not there then, DNS is not updated with new change.

hth.

Easy to suggest when don't know about the problem!
Ralph Grothe
Honored Contributor

Re: changing the hostname in HP UX

As Pete already said,
the people whose DNS server is authoritative for the domain of your host need to update their zone file.

You could run something like

netstat -q=soa your.hosts.old.domain

to find out who needs to be contacted.
Madness, thy name is system administration
murali_20
Occasional Advisor

Re: changing the hostname in HP UX

I got it resolved with my Sys admin changing the entry in DNS server.
Still I am not sure of the HP UX bahavior. Other OS, I am able to change the hostname from client and it will update the DNS and I can use the hostname directly without the intervention of sys admin.
Is that not possible in HP?
Fabio Ettore
Honored Contributor

Re: changing the hostname in HP UX

Hi,

I never heard OS can update hostname on the own system and DNS too.
What OS do you refer which can do that?

You have to work on DNS in order to change hostname, of course if you use DNS in your network.
Otherwise you can use /etc/hosts but then you have to change hostname for that system in all /etc/hosts of systems in your newtork.

Best regards,
Fabio
WISH? IMPROVEMENT!
vinod_25
Valued Contributor

Re: changing the hostname in HP UX

hi murali

The problem will be resolved by changing the permisions on the /etc/hosts file to:
-rw-r--r--. The permission settings initially only allowed root read access.

try this

Regards

Vinod K
murali_20
Occasional Advisor

Re: changing the hostname in HP UX

earlier I worked on linux, and a reboot had updated the DNS and I can ping/telnet with the new hostname.