[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian and FQDN lookup

On Thu 02 Apr 2015 at 16:47:56 -0600, Bob Proulx wrote:

> Alex Mestiashvili wrote:
> > >> and as far as I see it simply asks the DNS about the hostname using 
> > >> getaddrinfo.
> > > 
> > > But, with stock nsswitch.conf, it issues uname(2) syscall first, goes
> > > to /etc/hosts second, and if it encounters FQDN hostname - it all ends
> > > here.
> > > If /etc/hosts contain only bare hostname - it'd return a bare hostname.
> But /etc/hosts shouldn't have a bare hostname, right?  It should
> always have a canonical name first followed by aliases second.

For many people it will not matter. For setting up a mail server it will
>   man hosts
>        This  manual  page  describes  the format of the /etc/hosts file.  This
>        file is a simple text file that associates IP addresses with hostnames,
>        one line per IP address.  For each host a single line should be present
>        with the following information:
>               IP_address canonical_hostname [aliases...]
> The debian-installer will set things up right with an entry such as
> this one.
> foo.example.com foo

If 'Domain name' is blank you get ' foo'.

Reply to: