Central hostname management
Tom H
tomh0665 at gmail.com
Wed Jun 4 18:44:31 UTC 2014
On Wed, Jun 4, 2014 at 1:46 AM, Niki Kovacs <info at microlinux.fr> wrote:
>
> I'm currently converting some of my 100 % Slackware setups to a combination
> of Ubuntu 12.04 LTS on the server and ElementaryOS 0.2 (based on Ubuntu
> 12.04) on the desktop.
>
> My company primarily installs computer rooms in schools, town halls, public
> libraries and the likes. Home directories and authentication are all managed
> centrally, and I'm relying on the fact that I can easily clone a desktop
> client (I'm using Ghost4Linux for that) to install or replace it.
>
> On my existing setup (based on either Slackware 14.1 or 14.0), client
> hostnames are managed centrally. On the server, I have either Dnsmasq or a
> combination of DHCPD and BIND running. Here's what a sample dnsmasq.conf can
> look like:
>
> # /etc/dnsmasq.conf
> domain-needed
> bogus-priv
> interface=eth1
> dhcp-range=192.168.2.100,192.168.2.200,24h
> local=/mydomain.tld/
> domain=mydomain.tld
> expand-hosts
> # Nerim
> server=195.5.209.150
> server=194.79.128.150
> no-resolv
> # Client PCs
> dhcp-host=00:1F:D0:AE:EC:FE,desktop01,192.168.2.2
> dhcp-host=00:1D:09:15:4A:D8,desktop02,192.168.2.3
> dhcp-host=00:1E:C9:43:A7:BF,desktop03,192.168.2.4
> # Laptops
> dhcp-host=44:1E:A1:E6:FA:93,E4:D5:3D:BD:EA:05,laptop01,192.168.2.6
> dhcp-host=00:27:19:F1:BC:3A,00:19:E0:83:3A:C1,laptop02,192.168.2.7
>
> On the client desktop PCs (but not on the laptops), there's not a single
> static hostname information in the current Slackware setup. Meaning
> /etc/HOSTNAME only has this:
>
> localhost
>
> And /etc/hosts only has this one-liner:
>
> 127.0.0.1 localhost.localdomain localhost
>
> On startup, client machines get their hostnames (desktop01, desktop02, ...)
> sent to them by the server.
>
> Now I can't seem to replicate this behaviour with Ubuntu. On the desktop PCs
> I've removed the network-manager package, to replace it by a "classic"
> configuration using /etc/network/interfaces, but I can't seem to get this to
> work.
Do you have "host-name" on the "request" stanza of "/etc/dhcp/dhclient.conf"?
What does the "option host-name" line have in
"/var/lib/dhcp/dhclient.<nic>.leases"?
(It might be ".../dhcp3/..." rather than ".../dhcp/..." on 12.04.)
More information about the ubuntu-users
mailing list