Operating System - HP-UX
1833568 Members
4271 Online
110061 Solutions
New Discussion

Hostname change more then 8 char

 
SOLVED
Go to solution
Enter
Occasional Contributor

Hostname change more then 8 char

Hi
I am using 11.11, the problem is this, I want to Change host name more then 8 character like 20.when i change the hostname by using set_parms command. the name change successfully and machine reboot successfully. But when i insert uname command the output is only 8 character. But the output of host name show compete name. Is there any method to view compete name in uname commad.
Thanks in advance
4 REPLIES 4
Aussan
Respected Contributor
Solution

Re: Hostname change more then 8 char

Hi Enter
please note that host name has to be 8 characters long, you can setit to more but node name will always be 8 characters, and if node name and host name are different, then some applications will not work,
some applications check the hostname some the nodename, and some need teh 2 to be the same

you will have a conflict and make problems for yourself


at least on 11.11 is what i know...i don't know if they changed in in 11.23 or above

the reason for that is some older apps still use the 8 character hostname/nodename
The tongue weighs practically nothing, but so few people can hold it
Pete Randall
Outstanding Contributor

Re: Hostname change more then 8 char


No.

See the man page for uname(1) and uname(2). The uname command reports the UUCP name, which is limited to 8 characters. The hostname command reports the Internet (or domain/host name) which is limited to MAXHOSTNAMELEN characters as defined in /usr/include/sys/param.h - usually 64. The uname man page also says "It is strongly recommended that sys be identical for all commands and locations".


Pete

Pete
Torsten.
Acclaimed Contributor

Re: Hostname change more then 8 char

Hi,

the man page (here it is 11.31) says:

"Setting a nodename of more than 8 bytes is possible only with the appropriate configuration options enabled. It is strongly recommended that all related documentation be completely understood before setting a larger node name. A node name larger than 8 bytes can cause anomalous or incorrect behavior in applications which use the uname command or the uname() system function to access the name."

http://docs.hp.com/en/B2355-60130/uname.1.html

Sounds to me like "Don't do this!"

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Dennis Handly
Acclaimed Contributor

Re: Hostname change more then 8 char

On 11.31 there were a bunch of changes made to allow longer names in uname. But if you don't have your applications changed, this may cause problems for them.