Shutting down a DOS-XP/Vista box from Linux?

Associate
Joined
21 May 2007
Posts
1,464
Probably best asked here rather than winforum as most penguinista know their DOS fairly well too.

Is it possible to treat windows like a computer operating system and log in to it or otherwise send a remote shutdown command?

I know you can use a run32dll option to shut the box down, but how can one send that command to it without using a point and drool interface like VNC?
 
hmm - on testing it I cant seem to be able to get winexe to do much more than panic at me on my Ubuntu Hardy install. If you do get it working let me know pls cos i would find this v useful.

cheers

EDIT - Psexec doesnt seem to work under WINE either - maybe telnet is the best option
 
Last edited:
Few things to try there, thanks.

I think with netcat you'd need to construct the entire command yourself surely?

We don't have a windows domain controller set up so I don't THINK winexe is going to work judging from the examples given on the project page, but worth trying.
 
Possbly, but it's unsecured, unencrypted and downright dangerous. SSH maybe, but there is no DOS implementation of the daemon side of it as far as I know (putty is a damned good client though).

Thanks for the reply. At least I know I was on the right track :p
 
1. Have run32dll ( or whatever ) polling for the presence of a file, in some directory, on the computer that you want to shut down. Lots of sleep() in the loop, obviously.

2. Upload said file from your *nix box.

Clumsy, but it should work. :p
 
Samba comes with the 'net' command for windows RPC.
net rpc shutdown -I <windows-ip> -U administrator

You will then be prompted for the administrators password, viola!
Providing you have windows file sharing on, which is usually the case.. job done :)

//TrX
 
steve@orac ~ $ net rpc shutdown -I 192.168.0.73 -U admin
Password:
[2008/06/04 01:34:37, 0] utils/net_rpc.c:run_rpc_command(160)
Could not initialise pipe \winreg. Error was NT_STATUS_OBJECT_NAME_NOT_FOUND



Anything else I need running DOS-side other than F+P sharing?


Could it be because I have a null password on the admin account (no point setting one, it's windows)
 
Back
Top Bottom