Operating System - HP-UX
1833130 Members
3370 Online
110051 Solutions
New Discussion

Re: "uname -a" doesn't support hostname over 8 characters

 
SOLVED
Go to solution
TJ Yang_1
Occasional Advisor

"uname -a" doesn't support hostname over 8 characters

The OS version is 10.20. and I tried to find if there is patch in patch database with no luck.

Any pointer ?

Thanks for your time


tj yang
6 REPLIES 6
Jeff Schussele
Honored Contributor
Solution

Re: "uname -a" doesn't support hostname over 8 characters

Hi TJ,

Sorry, there is no patch available for this.
It's always been recommended to keep host names <= 8 characters because of the uname issue. Although hostnames can be up to 63 chars - it's simply not recommended.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Bill Hassell
Honored Contributor

Re: "uname -a" doesn't support hostname over 8 characters

Correct. uname (according to the man page) is the UUCP name (hence the name), while hostname is the network (typically TCP/IP) name. So uname is limited to the UUCP standards.

However, you can change hostname to a different value, longer than uname. Edit the file: /etc/rc.config.d/netconf and put an entry for:

NODENAME="name8"
HOSTNAME="namelongerthan8"

name8 is the short name, limited to 8 characters or less. Make sure that /etc/hosts has both names as in:

12.34.56.78 name8 namelongerthan8

Make sure that /etc/host is used first via /etc/nsswitch.conf as in:

hosts: files[NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]




Bill Hassell, sysadmin
S.K. Chan
Honored Contributor

Re: "uname -a" doesn't support hostname over 8 characters

A system hostname is accessed by a lot of different services which could go wrong if the hostname is set above that limit. For example ..
=> SD related tools (swinstall) will fail.
=> CDE (ToolTalk) will have some problem.
=> UUCP refuse to work and it'll give error like "system unknown".
Like Jeff said, there is no patch that addresses this issue right now.
John Bolene
Honored Contributor

Re: "uname -a" doesn't support hostname over 8 characters

Ah, not a good idea to set your hostname to Ihavethisreallyhonkinglonghostname.

8 chars can handle quite a bit of flexibility.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
TJ Yang_1
Occasional Advisor

Re: "uname -a" doesn't support hostname over 8 characters

The problem that triggered my notice of "uname -a" (uname -n, actually) is that big brother(http://www.bb4.com) is using "uname -n" to find the hostname. One of my host' hostname is 9 characters long so the return of "unknown" failed the startup. Since there is no patch, I changed the reference to "uname -n" to "hostname" in bbinc.sh.


Thanks guys for your informative replies. I didn't know uname is part of UUCP protocol commands.


rick jones
Honored Contributor

Re: "uname -a" doesn't support hostname over 8 characters

indeed, there is no patch to 10.20 to fix this long-standing problem, nor is it changed in 11.0, nor is it changed in 11.11

my advice is to do what bill suggested, and start treating the UUCP and IP namespaces separately, and make sure that anything that is going to be doing IP communications is not using uname or utssys or friends and is only using stuff like hostname, gethostname and such.

and if you are on a support contract, excercise it and submit an ER/defect against the current uname limitations.
there is no rest for the wicked yet the virtuous have no pillows