what is the CORRECT hostname of a machine, i mean, what i should put in the rc.conf or /etc/hostname in some systems: machine.mydomain.org(fqdn) or just machine(short) ?
well i´ve searched ALOT and got this answers:
RedHat says that is the fqdn (machine.mydomain.org)
Gentoo says that is the short (machine)
Solaris says that is the short (machine)
WLUG-WIKI says that is the short (machine)
NetBSD says that is the fqdn (machine.mydomain.org)
FreeBSD says that is the fqdn (machine.mydomain.org)
so when i type hostname it should return the full qualified domain name (fqnd) or the short ?
if it's a public one, use the whole name:
if not, then it does not really matter ... you can jsut use hostname or also the full name --- noone is wondering, because you use it locally :-)
The impossible missions are the only ones which succeed.
well don't know if it's the correct way, but how I remember learning it, was like this
however if I remember correctly it's what you want it to be, ie you use the fqdn if you are going to be in a domain setting where it will be running a network based service. just use machine name if it is just going to be a client.
I use both as it will announce with it's fqdn, however can still be accesed by just giving the machine name.
but hey I could be wrong the whole time
If you have your own domain name and want to run your system on the net, then you'd want to use the fqdn. You can give it any shortname you want, and set DNS to alias common hostnames like www,ftp,mail,etc. Poke around on the net, I think there are free dns servers that you can use (some even handle dynamic IPs).
If you don't have your own domain name, or are not going to run your system on the public net, then it really doesn't matter if you give it a fqdn or not. There are some apps out there (sendmail comes to mind), that prefer to find a fqdn and will complain if it can't get one. That's probably why RH uses a bogus fqdn, but that's just a guess.
That gets me thinking though: if you run, and use a local MTA for sending outgoing mail, you may run into trouble if you don't have a legitmate fqdn associated with your IP. There are a lot of remote MTAs out there these days that do a reverse name lookup on the system trying to hand them mail and without a legitimate fqdn, your mail will be rejected.
Personally, I don't use an fqdn on any of my systems (even my gateway box) connected to the net. Of course, I don't run a local MTA for sending mail.
Follow the link below, sign up, and accept one promotional offer. If I can get five suckers (err... friends) to do this, I'll get a free iPod. Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142