cancel
Showing results for 
Search instead for 
Did you mean: 

HPUX Hostname Change

SOLVED
Go to solution

HPUX Hostname Change

Anyone know how to change a HPUX 11.0 server???s hostname? I figured out how to change the IP, but have been told that you need to change the Hostname in several places and not just in SAM.
I said, I AM WORKING ON IT!
14 REPLIES
Dave Chamberlin
Trusted Contributor
Solution

Re: HPUX Hostname Change

set_parms hostname.
S.K. Chan
Honored Contributor

Re: HPUX Hostname Change

The cleanest way is ..
# /sbin/set_parms hostname
It'll prompt for you to reboot the system after the change is done.
James R. Ferguson
Acclaimed Contributor

Re: HPUX Hostname Change

Hi:

At a minimum, you need to change the hostname in '/etc/hosts' and '/etc/rc.config.d/netconf' and reboot.

As noted, this can also be done by executing '/sbin/set_parms' with the new hostname passed as an argument.

If you are running DNS, you may need to make additonal changes to reflect the hostname change.

Regards!

...JRF...
Sajid_1
Honored Contributor

Re: HPUX Hostname Change

You can do it through SAM. Once done, check the files - /etc/rc.config.d/netconf and /etc/hosts. Other method is /sbin/set_parms. You need to restart after changing the name. Give any name which is equal to or less that 8 characters!
learn unix ..
Philip Chan_1
Respected Contributor

Re: HPUX Hostname Change


Scottie,

You should use the command "set_parms hostname" (login as root) for changing hostname. The set_parms program supposed to update ALL necessary files for you. Direct update to /etc/rc.config.d/netconf and /etc/hosts will do too but still I believe using an automated process (running set_parms in your case) is the proper way.

SAM works too, but it has been un-predictable for me in the past. In one version it works but it might not in the next version.

Rgds,
Philip
Kelli Ward
Trusted Contributor

Re: HPUX Hostname Change

An add to Harry's soapbox.
Be sure to check /var/adm/inetd.sec just in case there are any entries that need to be updated.
Kel

It's nice to know there are others out there that are annoyed with set_parms
Although, it's okay on very, very generic network setups.
The more I learn, the more I realize how much more I have to learn. Isn't it GREAT!
Tom Dawson
Regular Advisor

Re: HPUX Hostname Change



Harry,

Thank You! I had thought it was my inexperience that led to my problems with set_parms. I had so many problems with it years ago that I stopped using it and haven't gone back.

Of course, my propensity to want to manually edit configuration files may have had something to do with it also!

Tom

< No Points Please... >
harry d brown jr
Honored Contributor

Re: HPUX Hostname Change

Kelli & Tom,

It works fine when it's used to set up a server for the first time, but after that it is as useful as the output from /dev/null.

live free or die
harry
Live Free or Die
MANOJ SRIVASTAVA
Honored Contributor

Re: HPUX Hostname Change

set_params hostname
change it via sam

Manoj Srivastava

Re: HPUX Hostname Change

Set_parms hostname and editing the /etc/hosts & /etc/rc.config.d/netconf has seemed to work in changing the hostname; I do not have a /var/adm/inetd.sec file to check, per Kelli's directions.

Everything looks to have worked; yet the network is not ???talking???. We get a link light on the nic, but when my network analyst tries to get the MAC Address from the NIC, it will not show. My guess is that the NIC has/had been disabled when the server was shutdown (it had problems last year and was sent to the funny farm for awhile??? Kinda like management after budget analyses???).

Thank you all for your help, I guess it???s back to the bar, err, a, the computer room to figure this out???
I said, I AM WORKING ON IT!
Sajid_1
Honored Contributor

Re: HPUX Hostname Change

hello,

if you think the NIC is disabled, then you can enable it through SAM. If the NIC status is down, then make it up with ifconfig command:
# lanscan
# ifconfig lan? up
learn unix ..
John Dvorchak
Honored Contributor

Re: HPUX Hostname Change

Did you remember to issue the command hostname to change the name after editing /etc/rc.config.d/netconf and /etc/hosts.

hostname new_hostname

verify the new name with hostname with no arguements. That way you don't have to reboot the computer to change the name.


ifconfig lan0

should tell you if the NIC is active or not, or course you would substitute you lan instance in the above command i.e. lan0 lan1 etc.


If it has wheels or a skirt, you can't afford it.

Re: HPUX Hostname Change

Well, thank you Sajid & John for the scanlan & ifconfig command; I didn't know that one (or many others, I am new at playing with UNIX).

However, the error was in the physical connection to the network, not anything on the server.

I said, I AM WORKING ON IT!

Re: HPUX Hostname Change

======================================

 

Do not write netconf backup file in /etc/rc.config.d.

 

=======================================

for example

 

ls -l  /etc/rc .config.d/netconf*

 

-rw-r--r--   1 bin        bin           8559 Jun 16 10:35 netconf
-r--r--r--   1 bin        bin          15737 Feb 28  2011 netconf-ipv6
-rw-r--r--   1 root       sys           8517 Aug 17  2012 netconf_badname-backup    <- remove or move this file

 

see

 

cat /sbin/rc1.d/S320hostname

 

 

 

staszprz