Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So one of the things that many (most?) Linux distributions can do is to either accept the dhcp option telling it what its node name should be, and/or do a reverse-lookup on the ip address it has been given via dhcp and apply its initial node name from that answer.

Is there a way to make XP do either of those?

share|improve this question
Can you add some detail as to why you want to rename the machines from DHCP? – Jim B Jun 4 '09 at 2:47
up vote 3 down vote accepted

Nope, unfortunately. The computer name is set in the registry, and it's not going to change based on DHCP or a reverse DNS lookup.

(I suppose, technically, it could be possible, but I'd guess you'd need a reboot after setting the name.)

(Okay, okay-- I suppose this wouldn't be that hard to do, but I'm fairly sure you're going to incur a reboot each time the name changes. Still, you could do this in a startup script, and if the name doesn't change, just boot as normal. Hey... this might be fun to write!)

share|improve this answer
What I figured. Thanks. – David Mackintosh Jun 7 '09 at 16:21

Its possible with a little help of wsname:

  1. collect the name and mac-address from your dhcpd.leases or write them on your own in a file (Mac2DnsName.txt") on a samba-share. Each line holds he mac-address and the name like this: 00508B052AE8 = Computer1
  2. write a autostart-batch with this content: wsname /RDF:"\\pdc\netlogon\Mac2DnsName.txt" /DFK:$MAC

So everytime the machine boots wsname looks into this file. If the PC-name differs (e.g. after a cloning-run), it changes the name and does a reboot. If the name doesn`t differ, nothing happens.

Runs like a charm here in several schools.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.