Operating System - HP-UX
1834646 Members
2266 Online
110069 Solutions
New Discussion

Re: Changing host info w/o rebooting

 
SOLVED
Go to solution

Changing host info w/o rebooting

I need to change the hostnames on a few HP 9000's and have them realize that the name of the domain they are in has changed, as well as the name of their DNS server. The ip's will stay the same. I'd like to just run set_parms, but I can't reboot these machines at my leisure.

Are these the right steps to follow without rebooting?

1. Change the hostname and DNS server name in /etc/hosts
2. Change the domain name in /etc/resolv.conf
3. Change hostname in /etc/rc.config.d/netconf

then run:
4. hostname

Thanks for any replies!
just do it!
6 REPLIES 6
Jitendra_1
Trusted Contributor

Re: Changing host info w/o rebooting

I think you got it right. The important one was /etc/rc.config.d/netconf which is often forgotten.
Learning is the Key!
Bruce Regittko_1
Esteemed Contributor

Re: Changing host info w/o rebooting

Hi,

Yes, the steps you have will change the hostname, however, you may have problems if you don't reboot.

Some applications read the hostname when they are launched and won't recognize that the hostname has changed. CDE, for example, becomes very ill when the hostname is changed. To "really" change the hostname, you should reboot.

--Bruce

p.s. You may also want to run

uname -S

which sets the node name (system name) that is used in the utsname structure. See the uname manpage for more information.
www.stratech.com/training
Tim Malnati
Honored Contributor

Re: Changing host info w/o rebooting

My best suggestion is to try to avoid hostname changes like the plague. There are many monitoring facilities that use it (like MeasureWare) and remote interfaces can sometimes get problematic too (like remote SAM). One of the selling points for using DNS is to be able to change an ip address seamlessly, not the other way around. If possible you are better off using an alias in DNS instead if you can get away with it. How many remote clients access this machine using DNS? There is a good chance that you will end up needing to add an alias to DNS from the old hostname to take care of this problem which sort of gets you the question of what's the point?
Dan Hetzel
Honored Contributor

Re: Changing host info w/o rebooting

Hi Jennifer,

I hope you're not running Oracle on your servers. The hostname is hard-coded in the database file and you'll have to ask your dba to fix this...

I agree with Tim when he's saying "changing a hostname should be avoided like the plague".

Good luck,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
marc seguin
Regular Advisor

Re: Changing host info w/o rebooting

I never had problems when changing the hostname with
/sbin/set_parms hostname
but it needs a reboot at the end...
Philip P. Hartl
Valued Contributor
Solution

Re: Changing host info w/o rebooting

Caution: As pointed out the hostname is used by various applications, however not even a reboot will resolve problems caused by changing the hostname in many cases. Case in point, OMNIBACK uses the hostname as a Cell Name in the database. Following a hostname change OMNIBACK will likely not recognize the new and lose track of the old Cell. To correct this run "omnidbutil -change_cell_name [ -old_host ]".
Don't take life so seriously; nobody gets out alive.