1833800 Members
2470 Online
110063 Solutions
New Discussion

uname -n

 
SOLVED
Go to solution
Charles Li_1
Advisor

uname -n

Hi,
We are using HP-UX 11.11. When I issue uname -n, it return the servername without the full domain.
When I try the same command on Tru64 and Linux RH AS, it return server name with the full domain.
Is this what HP-UX suppose to return?
I am having problem with users accessing my server, I am think the server name without full domain might be the problem.

Thanks
Charles
8 REPLIES 8
Pete Randall
Outstanding Contributor

Re: uname -n

Charles,

I suggest you take a serious look at the man page for uname. Go to the -n section and not the reference to the WARNINGS section. I'm not going to quote the whole thing here. Go take a look.


Pete


Pete
Steven E. Protter
Exalted Contributor

Re: uname -n

Please describe the problem you are having accessing the server.

Note that HP-UX does not support hostnames greater than 8 characters. You will have access issues if the hostname is greater than that. SD-UX will be VERY unhappy with that circumstance.

hostname returns the hostname

The hostname can be like his

server.yournet.org

It is contained in /etc/rc.config.d/netconf

Check the file /etc/nsswitch.conf to see how name resolution is working on your box.

Is your network using DNS? Are the entries for the HP-UX server correct in the DNS database?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Patrick Wallek
Honored Contributor
Solution

Re: uname -n

As far as I know that is normal for HP-UX.

What kind of problem are your users having? Most likely the hostname of your HP-UX box has nothing to do with it. Are the users attempting to connect vi hostname or hostname.domain.com? What type of address lookup facility (DNS?) do you use? Is the hostname able to be resolved both ways (hostname and hostname.domain.com)?

I would suspect you name resolution method before I would suspect your HP-UX machine itself.
Charles Li_1
Advisor

Re: uname -n

Pete,
Thanks for your reply.
I did look at the section that you refer me to.
+++++++++++++++++++++++++++++++++++++++++++++++
-n Display the node name (system name) by which the system is usually known in a UUCP network.
+++++++++++++++++++++++++++++++++++++++++++++++

Is the node name suppose to be without the domain?
ie. our server name is epic228 and the domain is dep.state.fl.us. When I issue hostname it return back epic228.dep.state.fl.us, but with uname -n, it only returns epic228. Is this the correct behavior? Or, is something not setup right on our server?
We would like both the hostname and uname -n to display server name with full domain.

Thanks
Charles
Pete Randall
Outstanding Contributor

Re: uname -n

Charles,

Maybe this excerpt from the WARNINGS section will help:

+--------------+--------------+---------------+-----------------------+
|Node Name |Command |name Format |Used By |
+--------------+--------------+---------------+-----------------------+
|Internet name |hostname name |sys[.x.y.z...] |ARPA and NFS Services |
|UUCP name |uname -S name |sys |uucp, related programs |
+--------------+--------------+---------------+-------- --------------+


Pete


Pete
Pete Randall
Outstanding Contributor

Re: uname -n

Charles,

Well, that didn't come out to legibly, but what it's saying is that "hostname" should return "sys.x.y.z" and "uname" should return "sys". This is consistent with the behaviour you're seeing and is correct for HP-UX.


Pete


Pete
Charles Li_1
Advisor

Re: uname -n

Pete, Thanks for you replys. Thats all I need to know.

Thanks to all.
Charles Li_1
Advisor

Re: uname -n

.