[CentOS] DHCP server and Windows XP clients : set hostname ?

Wed Apr 7 16:54:35 UTC 2010
Tom H <tomh0665 at gmail.com>

> For the last few years, I've been using exclusively Linux on servers and
> desktops, so I don't know anything about Microsoft products.
>
> When setting up a 100% GNU/Linux LAN, I use a local DHCP and DNS caching
> server, and then all the clients are configured to use DHCP. Hostnames
> are all handled by the server. This works very well and never causes any
> headaches.
>
> Now a local town hall has asked me to join their two networks (so they
> can exchange files via Samba), one using Windows XP on desktops, and the
> other running CentOS desktops. I plan to handle hostnames, IP addresses
> etc. as usual, by one central DHCP/DNS caching server. Right now I'm
> testing this on my "sandbox" network (three machines using Ghost images
> from various systems). I can configure a Windows XP desktop to get
> network configuration from the DHCP server OK, but 1) where does an XP
> desktops' hostname appear? 2) how can I handle it from the DHCP server
> (that is, *if* it's possible)?

The name of a Windows box is usually its netbios name and it is held at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName

A Windows box also has a hostname held at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Hostname
but I have never seen a setup where they are different.

If the XP boxes are running in a domain (which they must be), you will
not be able to change their names on the fly (or only on an irregular
basis with one of the extra tools that are shipped on server install
CDs) because both users and computers have to be members of a Windows
domain in order to log on to it. Once a Windows box accepts an ip
lease from the dhcp server, its A and PTR records are updated on the
dns server.