1819921 Members
2424 Online
109607 Solutions
New Discussion

HP-UX Prompt

 
mat72
Advisor

HP-UX Prompt

Hi,

I want to change the Unix Prompt for Unix 10.2.

If I do following

Log in as super user

#hostname newname

# uname –S newname

# HOSTNAME="newname"

# /sbin/init.d/net stop

# /sbin/init.d/net start

and check than the hostname with
# uname -a

the name is changed.

I also change the name in hosts and netconf

/etc/hosts

/etc/rc.config.d/netconf

But as soon as I reset the PC, the hostname is back to the old name.

Does I miss a something that I have to change>

Thanks.

5 REPLIES 5

Re: HP-UX Prompt

The command to change the system hostname is:

"set_parms hostname"

You will get prompted to enter the new hostname.

 

Hope that helps.



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
mat72
Advisor

Re: HP-UX Prompt

I used this command as well, but it is still same, after cycle power, the old name is back.

Re: HP-UX Prompt

I don´t have access to a HPUX system anymore, especially a 10.20 one.

Check if there is this file:

/etc/rc.config.d/hostname

You should find the HOSTNAME statement in that file and set_parms should have changed it.

If not, modify it and use the new name, then test again.

BTW.: Does your system use DHCP to get its IP-address ?

Check /etc/rc.config.d/netconf if you don´t know.

 



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
mat72
Advisor

Re: HP-UX Prompt

Hi Bertram,

There is no hostname file in /etc/rc.config.d.

If I reboot after set_parms hostname, I can see in the line the old name.

The system does not use DHCP.

If I do this

#hostname newname

# uname –S newname

# HOSTNAME="newname"

# /sbin/init.d/net stop

# /sbin/init.d/net start

log out and back in, the name is changed. If I reboot, it change back to the old name.

 

pkbin
HPE Pro

Re: HP-UX Prompt

@mat72 

Could you please provide the below outputs to check ?
#grep -i hostname /etc/rc.config.d/netconf
#grep -v ^# /etc/profile
#grep -v ^#  /.profile
#cat /etc/rc.log
#uname -a
Please let me know the old and new host name. 

Thanks



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo