Operating System - HP-UX
1845501 Members
3372 Online
110244 Solutions
New Discussion

hostname length limitation

 
SOLVED
Go to solution

hostname length limitation

Is there a way to set a hostname on an HP-UX system that is greater than 8 characters?
7 REPLIES 7
Sanjay_6
Honored Contributor
Solution

Re: hostname length limitation

Hi,

Maybe you would like to be the first few to use this new search tool that Dan is talking about and give us your feedback on the results.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=567593

Hope this helps.

Regds
Jeff Schussele
Honored Contributor

Re: hostname length limitation

Hi Randall,

Certainly - you could set it up to 63 characters. But just because you can doesn't mean you should.
You should keep it =< 8 chars or stuff like the uname command will break.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!

Re: hostname length limitation

Is there a reason HP-UX is set up with these kinds of limitations? Solaris allows lengthy hostnames, and it doesn't break things like uname. I've noticed that when you set the hostname on initial install, it will truncate anything after 8 characters, so does this mean that I have to modify it after OS installation?
Jeff Schussele
Honored Contributor

Re: hostname length limitation

Yep - edit /etc/rc.config/netconf & set HOSTNAME="yournamehere"

And it's not just uname - uucp will have trouble if there's not a different uname than hostname. Normally they're the same but you could have a hostname diff from the uname which is what uucp uses. It's set thru uname -S where the other is set via hostname.
And this is a SysV system, not BSD or MicroSlop crap. We have rules & we stick to 'em i.e. we definitely don't want hostnames with whitespace in 'em.
Experiment with a longer hostname & if it doesn't break anything you need well, then more power to you. But if it does then change it back to =< 8.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor

Re: hostname length limitation

The problem is not really with system utilities like uname --- those are easy to fix. The problems arise when using legacy applications that assume hostnames will not exceed 8 characters. You might find that applications have worked for years suddenly start crashing in unexpected ways.
If it ain't broke, I can fix that.

Re: hostname length limitation

Thanks. By the way, I wasn't trying to get anyone worked up by mentioning other OS vendors, I was just curious. The problem I face is that there is a company naming standard that cannot be used on HP servers because of this limitation, and I just wanted to find out more information. This used to be an all-SUN shop.
Jeff Schussele
Honored Contributor

Re: hostname length limitation

Hi (again) Randall,

Oh I wasn't worked up, that's just my normal cheery personality.
We just get amused here at times by the questions that come in from people used to other OSs that have a vast array of ever changing standards that they never adhere to anyway & then squawk because they can't get away with that stuff in this "dumb ole rigid" OS name HP-UX. Don't take it personally it certainly wasn't meant to be.

Cheers,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!