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

Derek Broughton derek at pointerstop.ca
Wed Sep 16 13:53:31 UTC 2009


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.

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.
-- 
derek





More information about the ubuntu-users mailing list