[Seattle-SAGE] hostname survey

Brian Hatch bri at ifokr.org
Thu May 26 23:00:31 PDT 2005

> What is a best practice on unix systems for specifying the hostname. 

My personal stance in this holy war:

	* /bin/hostname should always return a host name, not a FQDN.

	* /etc/hosts should have this line and doesn't need any others:  hostname localhost
	* there should be no FQDN for the local box in /etc/hosts

	* /etc/mailname and /etc/hostname should similarly have just the
	  hostname, not the FQDN.  (Same for /etc/sysconfig/network and
	  other non-Debian files.  ;-)

	* /etc/resolv.conf should include a search order that will yield
	  a FQDN that matches this machine's IP address.  IE
	  "host `/bin/hostname`" will yield something you see in
	  /sbin/ifconfig -a

	* FQDNs should come from dns.

	* Daemons that need full host names (/etc/postfix/main.cf) can
	  have them.  These are rare.  Very rare.

Too many problems have been caused by having FQDNs locally that didn't
match DNS, so you have different results than other machines when trying
to find you.  This is annoying.

Brian Hatch                  Mom, why does my hair
   Systems and                smell like vomit?  I'd
   Security Engineer          rather it smelled like
http://www.ifokr.org/bri/     dad's hairy armpit.

Every message PGP signed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.sasag.org/pipermail/members/attachments/20050526/0ce71dc5/attachment.bin>

More information about the Members mailing list