Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #174579

Re: set domain name in Debian `

From Andy Smith <andy@strugglers.net>
Newsgroups linux.debian.user
Subject Re: set domain name in Debian `
Date 2016-11-12 11:30 +0100
Message-ID <sCDJo-JU-3@gated-at.bofh.it> (permalink)
References <sCqVP-OQ-3@gated-at.bofh.it> <sCyA1-5IW-1@gated-at.bofh.it> <sCA8N-6SX-1@gated-at.bofh.it> <sCAit-6Wb-11@gated-at.bofh.it> <sCCDE-8uX-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On Sat, Nov 12, 2016 at 02:00:11AM -0700, Glenn English wrote:
> (Resend. Accidentally sent to a human instead of to the list...)

I responded off-list to Glenn since that one arrived first and I
wasn't sure if Glenn intended the contents of their /etc/hosts to be
private. Later I saw this copy on-list.

> > On Nov 11, 2016, at 11:45 PM, Andy Smith <andy@strugglers.net> wrote:
> > 
> > Okay. So I think we should focus on why "hostname -f" returns the
> > wrong/outdated info. I'm not sure yet.
> > 
> > Out of interest what does "hostname -d" return?
> 
> slsware.dmz

The system thinks Glenn's domain name is "slsware.dmz". Glenn wants it
to be "slsware.org" (I think).

> cat /etc/hostname: srv

Glenn has set the host name to be "srv".

I am 95% confident that the reason that Glenn's system thinks the
FQDN is "www.slsware.dmz" is because the first instance of "srv" in
the /etc/hosts is:

> > 192.168.2.203	www.slsware.dmz 		wsd srv

"hostname" returns what is in /etc/hostname (unless changed agfter
system startup).

"hostname -f" returns the part up to the first dot from whatever is
returned by resolving "hostname" against /etc/hosts.

"hostname -d" returns the part after the first dot from whatever is
returned by resolving "hostname" against /etc/hosts.

I think that if Glenn placed a line higher up that read:

192.168.2.203   srv.slsware.org srv

then the desired result would be achieved.

I would also add that this is a fairly large hosts file which is
ripe for causing confusion. I would generally recommend keeping
hosts files small, containing only enough information as needed for
bootstrapping, and using DNS for everything else. The rest of the
systems on the Internet (and maybe intranet) will be using DNS, and
it is desirable for there to be one source of truth.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

set domain name in Debian ` Glenn English <ghe2001@gmail.com> - 2016-11-11 21:50 +0100
  Re: set domain name in Debian ` Greg Wooledge <wooledg@eeg.ccf.org> - 2016-11-11 22:00 +0100
    Re: set domain name in Debian ` Glenn English <ghe2001@gmail.com> - 2016-11-11 23:10 +0100
      Re: set domain name in Debian ` Greg Wooledge <wooledg@eeg.ccf.org> - 2016-11-11 23:40 +0100
        Re: set domain name in Debian ` Glenn English <ghe2001@gmail.com> - 2016-11-12 04:50 +0100
      Re: set domain name in Debian ` Joe <joe@jretrading.com> - 2016-11-11 23:50 +0100
        Re: set domain name in Debian ` Glenn English <ghe2001@gmail.com> - 2016-11-12 01:40 +0100
  Re: set domain name in Debian ` Andy Smith <andy@strugglers.net> - 2016-11-12 06:00 +0100
    Re: set domain name in Debian ` Glenn English <ghe2001@gmail.com> - 2016-11-12 07:40 +0100
      Re: set domain name in Debian ` Andy Smith <andy@strugglers.net> - 2016-11-12 07:50 +0100
        Re: set domain name in Debian ` Glenn English <ghe2001@gmail.com> - 2016-11-12 10:20 +0100
          Re: set domain name in Debian ` Andy Smith <andy@strugglers.net> - 2016-11-12 11:30 +0100
            Re: set domain name in Debian ` Brian <ad44@cityscape.co.uk> - 2016-11-12 13:40 +0100
            Re: set domain name in Debian ` Glenn English <ghe2001@gmail.com> - 2016-11-12 17:10 +0100
              Re: set domain name in Debian ` sunrise@mailbug.com - 2016-11-12 19:40 +0100
                Re: set domain name in Debian ` Glenn English <ghe2001@gmail.com> - 2016-11-12 20:30 +0100
              Re: set domain name in Debian ` Greg Wooledge <wooledg@eeg.ccf.org> - 2016-11-14 14:30 +0100
                Re: set domain name in Debian ` Glenn English <ghe2001@gmail.com> - 2016-11-14 23:00 +0100
                Re: set domain name in Debian ` David Wright <deblis@lionunicorn.co.uk> - 2016-11-14 23:40 +0100
                Re: set domain name in Debian ` Greg Wooledge <wooledg@eeg.ccf.org> - 2016-11-15 14:10 +0100
                Re: set domain name in Debian ` Greg Wooledge <wooledg@eeg.ccf.org> - 2016-11-15 15:20 +0100
                Re: set domain name in Debian ` Brian <ad44@cityscape.co.uk> - 2016-11-15 16:00 +0100
                Re: set domain name in Debian ` Greg Wooledge <wooledg@eeg.ccf.org> - 2016-11-15 16:20 +0100
                Re: set domain name in Debian ` Brian <ad44@cityscape.co.uk> - 2016-11-15 16:40 +0100
                Re: set domain name in Debian ` David Wright <deblis@lionunicorn.co.uk> - 2016-11-15 17:10 +0100
                Re: set domain name in Debian ` Brian <ad44@cityscape.co.uk> - 2016-11-15 15:20 +0100
                Re: set domain name in Debian ` Joe <joe@jretrading.com> - 2016-11-15 16:10 +0100
                Re: set domain name in Debian ` Brian <ad44@cityscape.co.uk> - 2016-11-15 16:50 +0100
                Re: set domain name in Debian ` Joe <joe@jretrading.com> - 2016-11-15 17:30 +0100
  Re: set domain name in Debian ` Henrique de Moraes Holschuh <hmh@debian.org> - 2016-11-12 16:50 +0100
    Re: set domain name in Debian ` Glenn English <ghe2001@gmail.com> - 2016-11-12 18:20 +0100
      Re: set domain name in Debian ` Henrique de Moraes Holschuh <hmh@debian.org> - 2016-11-12 19:40 +0100
        Re: set domain name in Debian ` Glenn English <ghe2001@gmail.com> - 2016-11-12 22:40 +0100

csiph-web