Operating System - HP-UX
1759530 Members
3139 Online
108883 Solutions
New Discussion юеВ

Re: How to Change hostname

 
diudiu_1
Advisor

How to Change hostname

Dear all,
How to change hostname after system installation?
My system is Unix 10.20. after installation,I want to change hostname,then i edit /etc/hosts
and 'netconf' file. reboot it, but it always failed.
I also try to use 'sbin/set_parms' command to do this,Also failed.
While I start SAM. IT tells me that's BIND Database.you can't modify it in SAM.

Thank you very much for your reply.
5 REPLIES 5
KCS_1
Respected Contributor

Re: How to Change hostname

Hi,

what is the output of this?
# hostname

if the output is not the same with hostname that you want, set the hostname by

# uname -S



good luck!
Easy going at all.
Peter Godron
Honored Contributor

Re: How to Change hostname

Hi,
First: 10.20 has been out of support for some time and 11.0 is going out of support end of this year. Best upgrade to get the latest software versions!!

Once you have installed your system and rebooted it should have run /sbin/set_parms.
/sbin/set_parms hostname will change the hostname, but will require a reboot to take effect across the whole system ! See "man set_parms"

I would reset your /etc/hosts and netconf files and get set_parms working.
Senthil Prabu.S_1
Trusted Contributor

Re: How to Change hostname

Hi,
did u reboot after running set_parms script. So after a reboot only the new hostname will get reflected.

Also refer the following HPUX faq link which gives the steps to change the system hostname.

HTH,
Prabu.S
One man's "magic" is another man's engineering. "Supernatural" is a null word.
diudiu_1
Advisor

Re: How to Change hostname

Thank you all very much.
As I remember if I change the hostname by edit 'netconf' hosts' or use 'sbin/set_parms'
I can't login the system via CDE.
It appears an error.
now I have an ugent meetting, tomorrow I will give you details.

Thanks & Best regards
diudiu_1
Advisor

Re: How to Change hostname

I try to recover '/etc/rc.config.d/netconf' , 'hosts'
and then use '/sbin/set_parms' to change the hostname. But failed after reboot.
When I login,The error message "Tooltalk session can't start", It means the net config with errors.
While I checked 'netconf' and 'hosts' file,
And I found a error in the 'hosts' file.
I have two Lan interface. I use Lan0 for internet, But I find in the 'hosts' file, The hostname is set for Lan1(IP Address) by the command 'Set_parms'.
In fact, I want to set hostname for Lan0 by 'Set_parms'. if then I use 'vi' to edit 'hosts' file for Lan0, after reboot,I meet the same errors.

If I edit the 'netconf' and 'host' with the original host name, the reboot it , There is no errors.

Is it clear for you?
Thank you!