Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hostname w/o the domain.com

Status
Not open for further replies.

csutton

Programmer
Dec 27, 2000
213
US
Hi everyone,

I have one of our AIX boxes resolving to a Windows DNS server. When I do a who, it is returning the correct hostname and domain name. I would prefer it simply display the hostname, leaving off the domain.com part of it.

Any ideas or help?? We are using AIX 4.3.3

Thank you
Chris
 
You could get AIX to resolve it's own host name locally by specifying it in /etc/hosts AND setting the name resolution to check /etc/hosts before the Berkley Internet Name Daemon (BIND - i.e. before DNS lookup).
This is done by simply creating a file called /etc/netsvc.conf containing the one line:
hosts=local,bind
or
hosts=local,bind4

But beware of "other" IP addresses in /etc/hosts - these will be resolved according to the /etc/hosts definition before the DNS resolution.

Hope this helps...
 
Hi, thanks for the reply. I do not want it to resolve its own hostname, but any connection should return simply the hostname part of the computer, not the fully qualified domain name. Specifically, when I do a WHO.

We have a utility that gets the hostname, but cannot be modified to chop off everything after the period.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top