Where does an ubuntu machine get it's doamin name from

Marius Gedminas marius at pov.lt
Wed Sep 16 15:04:39 UTC 2009


On Wed, Sep 16, 2009 at 10:53:31AM -0300, Derek Broughton wrote:
> Marius Gedminas wrote:
> 
> > On Wed, Sep 16, 2009 at 08:11:04AM -0400, stan wrote:
> >> I need to change the domain on all of the machines at work by Friday. I
> >> had a contractor working on these machines and he "helped". That is he
> >> put shortt names in /etc/hostname, and /etc/mailname. This is NOT what I
> >> asked him to do, but it is what I found. My first thought is just to put
> >> the new FQDN in there, but this has my curiosity stired up. Where are
> >> these machines currently getting thier doamins from? They are not running
> >> NIS, so that can't be it.
> > 
> > /etc/hosts, usually.  Try 'man hostname', it says the following:
> 
> er, no.
> > 
> > If you don't have a static IP, it's customary to use a different loopback
> > address:
> ...
> 
> If you don't have a static IP (and for multiple machines "at work" you 
> normally wouldn't) it's customary to get the domain name from the DHCP 
> server.

That works fine for /etc/resolv.conf, i.e. looking up other hosts in the
same domain by using short names, but I don't recal ever seeing hostname
--fqdn output mylocalhostname.domainreceivedfromDHCPserver.  Are we
talking about the same thing here?

> Typically, you don't want to touch /etc/hostname, /etc/mailname, or 
> /etc/hosts, you just want to reconfigure the DHCP server.
> 
> Most DHCP servers, by default, simply return their own domain name.

Marius Gedminas
-- 
As easy as 3.14159265358979323846264338327950288419716
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090916/717647e8/attachment.sig>


More information about the ubuntu-users mailing list