Summary: hostname

From: Alain Brossard EPFL-SIC/SII (
Date: Tue Mar 19 1991 - 11:24:50 CST

> As we upgrade all our machines, we are switching to using
> DNS. The question is, should we be using fully qualified name (FQDN)
> as hostname? Phrased otherwise, my machine is called sasun1, should
> it be called should hostname return
> As anybody done this? What could break? I already know
> that I would have to remake my NIS maps to change the server name
> and modify all the /etc/hosts on machines not using DNS yet.
> Alain

   The general opinion is to use short hostname to simplify user's

----- Begin Included Message -----

From: (Jacques Beigbeder)

No, it's not necessary.
And it has a lot of disavantages: a lot of programs (df, rwho) show
bad listings with long names. Here we have in our /etc/hosts: merisier
----- End Included Message -----
And for a dissenting opinion:

----- Begin Included Message -----
From: Tim Becker <>

Absolutely, use the fully qualified domain name. We have been doing
this on our Sun's for several years now (maybe 4, I can't remember
exactly when we started). If you don't do this, you need to play
games (although Sun supports the games, they like this braindamaged
----- End Included Message -----

What games? It seems to work just fine for us using short names.

----- Begin Included Message -----
From: Scott Blandford <>

We use fully qualified hostnames everywhere except where we set the variable
hostname in the rc files. Here we just use the short name that is also mentioned
as an alias in our /etc/hosts file. We have had no problems doing it this way
Scott Blandford
Christopher Newport College
----- End Included Message -----

----- Begin Included Message -----
From: (Brendan Kehoe)

  I think you could go either way, but my personal preference is not
  to -- for one thing, the hostname is limited to MAXHOSTNAMELEN (64
  on mine .. see /usr/include/sys/param.h).

     Brendan Kehoe - Widener Sun Network Manager -
  Widener University in Chester, PA A Bloody Sun-Dec War Zone
----- End Included Message -----

----- Begin Included Message -----


     We switched over to FQDNs years ago on all our machines. The
only real problem we had was when converting to SunOS 4.0. At that
time there was a bug in the bootparamd code, the EEPROM boot code, or
the downloaded boot code (I don't remember which) that had problems if
one of the boot parameter strings was too long. To work around this,
we used the short host name for the root directory name (i.e. root for was /export/root/client). We also used the short
host name for the server name (as in root=server:/export/root/client)
in the params. So, the whole thing looked like \
        root=server:/export/root/client \

instead of \ \

     I don't know if the bug still exists, but we continue with the
short names in the bootparams (note that the key is still a FQDN).
You must also be sure to put the full names in the export list because
some versions of mountd do the authentication.
]] The client name HAS to be fully qualified in anycase
     We always set hostname to the FQDN, and we have a trivial shell
script installed in /usr/local/bin/shorthostname for those that want
to use the short name in prompts, etc. It is

hostname | sed -e 's/\..*//'

Daniel Trinkle
Dept. of Computer Sciences {backbone}!purdue!trinkle
Purdue University 317-494-7844
West Lafayette, IN 47907
----- End Included Message -----

----- Begin Included Message -----
From: (Morry Katz)

Assuming you are using Sun's DNS which requires that you be running
NIS (YP), your YP Domain name should match your DNS domain and your
hosts names should just be the unqualified names. DNS will postpend
your domain name on queries as needed. Entries in the YP can remain
Morry Katz
Rockwell Science Center (machine administration issues) (other)
----- End Included Message -----

]] Wrong here, if your NIS domain name is not equal to your domain
]] name (!), you just need a file called /etc/resolv.conf that contains
]] ``domain''.

----- Begin Included Message -----

From: (Andy Feldt)
  We have all our Suns set up using DNS via NIS on our master NIS machine.
This machine is NOT the nameserver (the nameserver is elsewhere on campus).
We use simple names for all of our hostnames. We also have an NIS domain
name that is different from our Internet domain name. The only catch is that
you must set up the sendmail config files appropriately, since what Sun
provides does not appear to work in this case. Other than that, we have
experienced no problems.

Andy Feldt
----- End Included Message -----

]] True, we do have a different, but are using successfully

        Also thanks to:

From: (Wietse Venema)
From: " (Michael van Elst)" <>
From: Doug Neuhauser <>
From: Adam Feigin <>

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:12 CDT