Operating System - HP-UX
1825852 Members
3016 Online
109688 Solutions
New Discussion

Re: hostname greater than 8 characters

 
SOLVED
Go to solution
John Payne_2
Honored Contributor

hostname greater than 8 characters

We (not I) have adopted a new naming scheme here. I have installed a new server with one of the new names and sam is complaining about hostname not matching the nodename when I go into 'network interface cards' Sam wants me to trunkate the system name to 8 characters...

Any ideas on how to make sam happy and keep the 10 character hostname? The nodename appears to be 'unknown', as evidenced by uname -a...

Thanks

John
Spoon!!!!
8 REPLIES 8
John Payne_2
Honored Contributor

Re: hostname greater than 8 characters

Yeah, I should have mentioned that I looked through the threads and have tried setting the nodename different than the hostname as the threads suggest, but SAM still complains about it and wants to reset the hostname.

Am I out of luck and just need to do networking changes manually from now on?

John
Spoon!!!!
S.K. Chan
Honored Contributor

Re: hostname greater than 8 characters

Take a look at file ..
/usr/sam/lib/C/ra.ui
which has "MAXCHARS" defined. You might be able to tweak it here. I have not try it.
John Payne_2
Honored Contributor

Re: hostname greater than 8 characters

The /usr/sam/lib/C/ra.ui file does not appear to have an entry that can be changed for that. There are 3 entries, but 1 is for a remote root password, etc.

Thanks anyway,

John
Spoon!!!!
Kelli Ward
Trusted Contributor

Re: hostname greater than 8 characters

Hi,
The only thing I can think of of the top of my head is aliasing.
Although the "we(not I)'s" may not cotton to it. ;) (or your particular setup might not allow it.)
If I find anything else, I'll send it your way.
Best of luck,
Kel

The more I learn, the more I realize how much more I have to learn. Isn't it GREAT!
Bill Hassell
Honored Contributor

Re: hostname greater than 8 characters

As mentioned, the hostname is restricted to 8 chars and cannot be increased without breaking several commands in HP-UX. However, the internal hostname can certainly be 8 with an alias in /etc/hosts or DNS of a much longer string. As an example, you can call your server web1 with a web server address of: verylongwebservername.domain.com and it will work just fine.


Bill Hassell, sysadmin
John Payne_2
Honored Contributor

Re: hostname greater than 8 characters

Thanks for the replies. This is what I had to do. This afternoon I decided to set the short name as the hostname and alias the long name through both /etc/hosts and DNS. For those that decided the naming scheme, the server name will be the 10 character name...

John
Spoon!!!!

Re: hostname greater than 8 characters

I had the same problem.
I avoided contact with DNS administrators and maded the alias only local - in /etc/host

but there was problem - my DNS
did not recognise my alias
and there was extreme long time for CDE to start


and the solution was :
i set up name service switch
to search host first in /etc/host and only after then
DNS and NIS

(default is DNS first )