Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to manage a DHCP server that runs on a windows 2003 machine from linux? I have searched but can't find anything.

I am hoping to script something up in linux (whatever language), that would allow me to add/remove dhcp leases via command line in linux (ie: ./add-dhcp-lease.pl )

Anyone know if this is even possible?

share|improve this question

migrated from stackoverflow.com Dec 1 '10 at 5:34

This question came from our site for professional and enthusiast programmers.

    
Have you seen this: experts-exchange.com/OS/Microsoft_Operating_Systems/Server/…? –  Cody Gray Dec 1 '10 at 4:29
    
You could remote desktop from *nix into the win box... –  OMG Ponies Dec 1 '10 at 4:48
1  
Maybe winexe + command line dhcp is what you want. probably easier to just RDP in though. –  Zoredache Dec 1 '10 at 7:19

2 Answers 2

allow me to add/remove dhcp leases via command line in linux (ie: ./add-dhcp-lease.pl )

That pre-supposes that the MS dhcp server has some API or CLI interface itself. AFAIK, although it uses a JET DB to maintain the config, this is not intended to be accessible by other programs, and there is no published API. However the netsh command is a CLI tool available on MSWindows boxes for configuring the DHCP server. How you get the instructions from the Linux box to the MSWindows box is a different can of worms. Telnet is very insecure - but you could tunnel it over SSL (e.g. using stunnel at both ends).

It would be massively simpler to run a dhcpd on the linux box.

share|improve this answer
    
netsh and win32 APIs are the only ways I know of to remotely control Windows DHCP. –  Michael Steele Apr 21 '11 at 20:00

Thank you all, I think my using a combination of winexe and netsh from a linux script I may be able to get this to work.

I know that RDP'ing and doing it by hand would be the preferred way, but I wanted some automation to make our lives easier.

I appreciate all of your time!

Thanks!

Oh, and I would love to be running dhcpd on a linux box, believe me, but I'm the only one who wants to, haha. ;/

share|improve this answer

Your Answer

 
discard

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.