Central hostname management

Niki Kovacs info at microlinux.fr
Wed Jun 4 05:46:53 UTC 2014


Hi,

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.

Any suggestions ?

Cheers from the sunny South of France,

Niki

-- 
Microlinux - Solutions informatiques 100% Linux et logiciels libres
7, place de l'église - 30730 Montpezat
Web  : http://www.microlinux.fr
Mail : info at microlinux.fr
Tél. : 04 66 63 10 32




More information about the ubuntu-users mailing list