Operating System - HP-UX
1755261 Members
5612 Online
108831 Solutions
New Discussion юеВ

Re: hostname length limitation

 
SOLVED
Go to solution
Berlene Herren
Honored Contributor
Solution

Re: hostname length limitation

"The setuname() system call sets the node name (system name), as returned in
the nodename field of the utsname structure, to name, which has a length of
namelen characters. This is usually executed by /sbin/init.d/hostname at
system boot time. Names are limited to UTSLEN - 1 characters; UTSLEN is
defined in ."

UTSLEN is #defined to _SYS_NMLN which is set to 9.

Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm
derek b smith_1
Regular Advisor

Re: hostname length limitation

what is the patch name to go beyond 8 characters? I did look in params.h and yes 64 is the max but what is there a patch needed to go beyond 8 considering this variable in params.h?
does this apply to 11i as well?
thanks
derek
Bill Hassell
Honored Contributor

Re: hostname length limitation

AS mentioned in the URL above, adding the patch will BREAK a lot of programs. You don't want to change the hostname to more than 8 characters. Even the patch will not work until you create a file that is called something: ItakeFULLresponsibilityFORallTHEproblems

As mentioned above, the network name can be 64 characters long, but the uname value cannot be longer than 8 characters. Although not clearly defined in the netconf file, you must set NODENAME to an 8 character name and set HOSTNAME to anything you like up to 64 chars. This will usually be the name your system will have in DNS. Both NODENAME and HOSTNAME should be set in /etc/rc.config.d/netconf


Bill Hassell, sysadmin