[Seattle-SAGE] hostname survey
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:
127.0.0.1 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
* 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...
Size: 189 bytes
Desc: Digital signature
More information about the Members