HOWTO: Remote Shutdown of a Windows Computer from Linux

Linux Star WarsI was away for a few days with my family visiting relatives, but being self-employed it can be hard to take time off, and wouldn’t you know it I had to spend a little time online checking email, finding passwords for people and occasionally just checking in on things at the house through a remote desktop connection to a Windows media computer (ugh, I know) back at home.

The only problem is that after the first night I was not able to connect to the remote desktop. I knew the machine was there, I could SSH into my Linux server and ping the Windows computer but there was no way it would properly connect a remote desktop connection. I had to reboot the Windows machine to see if I could get it back to normal. Thankfully my Linux server uses Samba as well and with a little searching I soon had my answer…

net rpc SHUTDOWN -C “some comment here” -f -I x.x.x.x -U user_name%password

I modified it a little bit and came up with this:
net rpc shutdown -r -f -I xxx.xxx.xxx.xxx -U username

I entered my password and a few minutes later guess what I was able to do? I was able to connect to my remote desktop on my Windows machine back at home. Linux saves Windows once again.

Stumble It
Add to Del.icio.us

Did you like this post?

Digging and sharing is a great way to say thanks!

Leave a Reply

© 2008 twinturbo.org. All Rights Reserved.
30 queries. 1.130 seconds. | ¯\(°_o)/¯
Word to our gui, os, http server, database, and scripting language. lamp-for-life.