Operating System - HP-UX
1837896 Members
3474 Online
110122 Solutions
New Discussion

Re: How to change the system name

 
Deny DeRosier_1
Occasional Contributor

How to change the system name

My company was recently acquired and I have been asked to rename the system name from abc.com to xyz.com.

Is there a checklist for this? I'd hate to miss a step and hose my system.

Thanks
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor

Re: How to change the system name

Hi Deny:

I assume you want to change the system's "hostname". To do this you can run:

# /sbin/set_parms hostname

(you will be prompted appropriately. Plan a reboot).

-- or you can manually edit the following, and then reboot:

> /etc/hosts
> /etc/rc.config.d/netconf
> /etc/resolv.conf ...if domain is changing...

...JRF...
Alan Riggs
Honored Contributor

Re: How to change the system name

Reboot should not be necessary, though some software packages (if network aware) might need to be restarted. Also, some software either brands to hostname or does gethostbyname() calls. In the former case, you may need to relicense. In the latter, you may need to reinstall that software.

Procedure:
hostname NEWNAME
uname -S NEWNAME
vi /etc/hosts (change name)
vi /etc/rc.config.d/netconf (change name for appropriate interface)
/sbin/init.d/net stop
/sbin/init.d/net start
Patrick Wallek
Honored Contributor

Re: How to change the system name

If you are looking to change the domain name (xyz.com) then you will need to change it in your /etc/resolv.conf file and also change any entries in /etc/hosts and change your DNS, if you use it, to reflect the new domain name. Other files to look at: ~/.rhosts, /etc/hosts.equiv, anything relating to NIS or NIS+, and probably a whole lot more that I can't think of right now.

Changing the domain name could affect a lot of other things as well. Anything that would use the fully qualified system name (system.xyz.com) will be affected and have to be changed.

Keep this in mind if you are in fact changing the domain name.
Jimmy Rogers
Frequent Advisor

Re: How to change the system name

Our group used to edit all those files etc. But we found that there were too many chances for errors. Do yourself a favor, schedule a reboot, use the "set_parms hostname" option, and don't violate the KISS principle.
Rob Smith
Respected Contributor

Re: How to change the system name

I agree, save yourself a lot of trouble and use set_parms. Anytime I have had to change hostname/ip related information and I did not use set_parms something silly always came up. Whenever I have just used set_parms it went smoothly.

Good Luck!
Learn the rules so you can break them properly.
John Bolene
Honored Contributor

Re: How to change the system name

Looks like most everything has been answered, but:

A real nice thing to do in your web server (assuming you are running one for the old and new company) is to have a redirect from the old url address to the new url address and keep the old site up for a few months.

Customers seem to get upset when the old url suddenly quits working.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Jon Finley
Honored Contributor

Re: How to change the system name

One last note. If you manually change the hostname the following sd-ux files will not be updated, and will affect you in the future:
/var/adm/sw/security/_ACL and _OWNER and
/var/adm/sw/products/ifiles/_ACL and _OWNER.

set_parms hostname WILL update these files.

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