[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] /etc/host vs /etc/hostname
Hello everyone,
when reading the ncftp source, I found the explanation:
It seems that /etc/host is a version of /etc/hostname that is
supposed to contain the fully qualified domain name, not just
the machine's name. ncftp uses it to create the anonymous
password, if $HOSTNAME is not defined in any env variable.
Btw, regarding this HOSTNAME variable, it seems the only safe
place to decalre it is in mint.cnf, since declaring it elsewhere
doesn't ensure it will be properly exported.
Last, I notice most Unices have a 'domainname' command similar to
'hostname' (though much more complete) but we don't. Would that
be difficult to port? Here's what the Debian one allows:
<sandels:503:q-funk> domainname --help
Usage: hostname [-v] {hostname|-F file} set hostname (from file)
domainname [-v] {nisdomain|-F file} set NIS domainname (from file)
hostname [-v] [-d|-f|-s|-a|-i|-y] display formated name
hostname [-v] display hostname
hostname -V|--version|-h|--help print info and exit
dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y
-s, --short short host name
-a, --alias alias names
-i, --ip-address addresses for the hostname
-f, --fqdn, --long long host name (FQDN)
-d, --domain DNS domain name
-y, --yp, --nis NIS/YP domainname
-F, --file read hostname or nis domainname from File
This comand can get or set the hostname or the NIS domainname. You
can also get the DNS domain or the FQDN (fully qualified domain name).
Unless you are using bind or NIS for host lookups you can change the
FQDN (Fully Qualified Domain Name) and the DNS domain name (which is
part of the FQDN) in the /etc/hosts file.
--
Martin-Eric Racine http://www.pp.fishpool.fi/~q-funk/M-E/
The ATARI TT030 Homepage http://funkyware.atari.org/TT030/
----------------------------------------------------------------
Intellitel Communications www.intellitel.com +358 (5) 624 3283