Re: set domain name in Debian `
On Sat, 12 Nov 2016, Glenn English wrote:
> Thanks all. It's been quite a ride. Now everybody write it down: it
> has nothing to do with what's in /etc/hosts or /etc/resolv.conf. There
> has to be a live, accessible DNS server for the domain somewhere. At
> least at slsware.org there does.
Maybe for the install.
But the whole thing really doesn't need any DNS servers *as long as*
everything you need is resolved statically by some module in
/etc/nsswitch.conf... such as the default "files" module, which reads
/etc/hosts.
At which point, it boils down to a complete enough, correct /etc/hosts
> It does seem that /etc/hosts should work, though...
It does work, provided that you have "files" first in the list of NSS
modules, and you have both the nodename and the FQDN in /etc/hosts for
the correct IPs and in the correct order. Otherwise, it depends.
> No, I take it back. I don't think DNS is the whole story. It worked in
> this case, but how does the installer get a domainname?
The *installer* either asks the user for the FQDN and gets the nodename,
domain name and FQDN from that (and it *should* write them to /etc/hosts
and /etc/hostname appropriately), or gets information from DHCP/DHCPv6
and the DNS while autoconfiguring.
Now, *what* the DHCP/DHCPv6 and DNS will answer, well, that's up to your
local network.
--
Henrique Holschuh
Reply to: