Shutdown XP/Vista from Ubuntu

  • jammer2552
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 23, 2006
  • Posts: 139
  • Status: Offline

Post May 19th, 2009, 5:05 am

I am running a headless Ubuntu Server 8.10 Intrepid. I have a nice UPS hooked up to it with apcupsd running so the server gets shutdown if the need should arise. However, I also have an XP/Vista (Dual boot) desktop running on the UPS. It would be very nice if I could get the desktop to shutdown when the need arises. So. I know how to edit the apccontrol file in /etc/apcupsd, but... the command?

net rpc shutdown -I 192.168.1.102 -U ubuntu%password

^Returns WERR_OK

So any ideas on how to do this?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 19th, 2009, 5:05 am

  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Joined: Jul 20, 2007
  • Posts: 3318
  • Loc: Trout Creek, MT
  • Status: Offline

Post May 19th, 2009, 7:12 am

If your UPS has software, put the software on the XP/Vista machine. Then this depends on how the UPS connects to the computer. If it has a serial connection AND a usb connection, then use one on one computer and the other on the other computer. If it doesn't have both, then you are stuck.
Like Mr Spork, I also write about my interest in alcoholic beverages.
  • jammer2552
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 23, 2006
  • Posts: 139
  • Status: Offline

Post May 19th, 2009, 9:32 am

APC Back-UPS 1500 RS w/LCD
Only a data port which converts to USB.

I'm sure there must be a way to remote shutdown an XP/Vista machine from Vista...
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Joined: Jul 20, 2007
  • Posts: 3318
  • Loc: Trout Creek, MT
  • Status: Offline

Post May 19th, 2009, 10:03 am

You might check the owners manual for that UPS to see if it is even capable of shutting down more than one machine. Or it could even be something in the APC software that goes on the computer, you plug the UPS into one machine then that one will shutdown all the others through the APC software before shutting down itself, I'm not sure.
Like Mr Spork, I also write about my interest in alcoholic beverages.
  • jammer2552
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 23, 2006
  • Posts: 139
  • Status: Offline

Post May 19th, 2009, 10:31 am

Are you aware of the software that I am using?

http://www.apcupsd.com/

It works fine for shutting down my server. But I have the ability to script the shutdown command, and I would like to add a command that would remotely shut down my desktop since it is also on the UPS.
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Joined: Jul 20, 2007
  • Posts: 3318
  • Loc: Trout Creek, MT
  • Status: Offline

Post May 19th, 2009, 11:31 am

Ah fart, I'm not. I kind of skipped over the apcupsd part of your original post. Normally a UPS comes with a disc and then you can put that software on a server and see the power consumption of all the devices connected to it and it will shutdown the server when the power goes out, I didn't realize you were using a special thing. w0ops!
Like Mr Spork, I also write about my interest in alcoholic beverages.
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Joined: Jan 23, 2004
  • Posts: 2673
  • Loc: Somewhere outside the box in Sarasota, FL.
  • Status: Offline

Post May 19th, 2009, 1:02 pm

If you install an ssh server on your XP box(There's one by Vandyke, and a freebie called copssh), you can run this remotely;
tsshutdn.exe.

That will shut down the XP box.
"It's always a long day, 86,400 won't fit into a short."
  • jammer2552
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jul 23, 2006
  • Posts: 139
  • Status: Offline

Post May 20th, 2009, 10:40 am

Alright, I did something along the lines of what Daemonguy suggested and installed Cygwin with sshd. Now to set up ssh-keygen to autologin the server and run tsshutdn.exe!

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 47 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.