Operating System - HP-UX
1758663 Members
2140 Online
108874 Solutions
New Discussion юеВ

Re: How to Change Host Name

 
SOLVED
Go to solution
Patricia Tang
Advisor

How to Change Host Name

Hi,

Can Anyone tell me how to change the host name.

Is it typing " hostname host-name"
and edit /etc/hosts?

Please advise
Thanks in advance.

Regards,
Pat
6 REPLIES 6
Carsten Krege
Honored Contributor
Solution

Re: How to Change Host Name

The only supported way to change the hostname of a system is by using

# set_parms hostname

This command will guide you through the steps to change the hostname.

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
federico_3
Honored Contributor

Re: How to Change Host Name



/sbin/set_parms hostname


federico
Plamen SIMEONOV
Advisor

Re: How to Change Host Name

Hi,

First make changes you need in your DNS server. After that:
set_parms
You will see all "set_parms possibilities"
The right is:
set_parms hostname

(P)
Tim D Fulford
Honored Contributor

Re: How to Change Host Name

Patrica

You can cahnge the name in an unsupported fashon

1) edit /etc/hosts
[...]
2) edit /etc/rc.config.d/netconf
HOSTNAME=
3) change hostname
# /sbin/init.d/hostname start

No reboot!!!

However, you will need to update DNS/NIS/all you hosts files to replicate this change 'round your system. I would suggest leaving the old hostname as an alias for a while!

I do agree with the above, HP may not support this method (without a re-boot). Some of your applications may require a hostname, which has just changed. You'll need to suck it & see

Tim
-
Thierry Poels_1
Honored Contributor

Re: How to Change Host Name

hi,
just want to add a little point: after the "set_parms" you should check your /etc/hosts file because all you aliases for this server will be gone.
regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Jon Finley
Honored Contributor

Re: How to Change Host Name

If you change the host name in the "unsupported" method, you run the risk of having problems with software installs in the future. Both the /var/adm/sw/products/ifiles and /var/adm/sw/security directories contain files that have the hostname of the system burned in (_ACL and _OWNER). The safest method is what Carsten reccommended.

# set_parms hostname

Jon
"Do or do not. There is no try!" - Yoda