Welcome to the North American Subaru Impreza Owners Club Friday March 29, 2024
Home Forums Images WikiNASIOC Products Store Modifications Upgrade Garage
NASIOC
Go Back   NASIOC > NASIOC Miscellaneous > Off-Topic

Welcome to NASIOC - The world's largest online community for Subaru enthusiasts!
Welcome to the NASIOC.com Subaru forum.

You are currently viewing our forum as a guest, which gives you limited access to view most discussions and access our other features. By joining our community, free of charge, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is free, fast and simple, so please join our community today!

If you have any problems with the registration process or your account login, please contact us.







* As an Amazon Associate I earn from qualifying purchases. 
* Registered users of the site do not see these ads. 
Reply
 
Thread Tools Display Modes
Old 12-04-2006, 11:11 AM   #1
Akirasoft
Scooby Guru
 
Member#: 2973
Join Date: Nov 2000
Chapter/Region: MWSOC
Location: Inverness, IL
Vehicle:
2018 Camaro ZL1 1LE
Red

Default Unix port of Windows shutdown command (to shutdown wintel hosts FROM unix)?

Does anyone know if there is a port of the windows shutdown tool to unix?

I need to shutdown a few windows hosts from a unix host.
* Registered users of the site do not see these ads.
Akirasoft is offline   Reply With Quote
Sponsored Links
* Registered users of the site do not see these ads.
Old 12-04-2006, 11:13 AM   #2
bpwatts
Scooby Specialist
 
Member#: 111635
Join Date: Apr 2006
Default

Quote:
Originally Posted by Akirasoft View Post
Does anyone know if there is a port of the windows shutdown tool to unix?

I need to shutdown a few windows hosts from a unix host.
http://www.linuxforums.org/forum/red...linux-box.html
bpwatts is offline   Reply With Quote
Old 12-04-2006, 11:21 AM   #3
Akirasoft
Scooby Guru
 
Member#: 2973
Join Date: Nov 2000
Chapter/Region: MWSOC
Location: Inverness, IL
Vehicle:
2018 Camaro ZL1 1LE
Red

Default

Quote:
Originally Posted by bpwatts View Post
thats actually a windows python script.
Akirasoft is offline   Reply With Quote
Old 12-04-2006, 11:26 AM   #4
-=C=-
Scooby Specialist
 
Member#: 7719
Join Date: Jun 2001
Vehicle:
99 F-150 crew cab
with illegals in bed

Default

Remote Shell daemon?
-=C=- is offline   Reply With Quote
Old 12-04-2006, 11:36 AM   #5
martel
Scooby Specialist
 
Member#: 11178
Join Date: Oct 2001
Chapter/Region: South East
Location: Raleigh
Vehicle:
2017 Volt
I can haz mod?

Default

if you have terminal server installed you can run "tsshutdn" or something like that.
martel is offline   Reply With Quote
Old 12-04-2006, 11:40 AM   #6
Akirasoft
Scooby Guru
 
Member#: 2973
Join Date: Nov 2000
Chapter/Region: MWSOC
Location: Inverness, IL
Vehicle:
2018 Camaro ZL1 1LE
Red

Default

Quote:
Originally Posted by martel View Post
if you have terminal server installed you can run "tsshutdn" or something like that.
yeah thats great too, if I had a windows host available to run the command on


Basicaly the explanation, I have a linux host at home that I ssh into. I need to shutdown one of my windows boxes at home remotely, I have no access to that box other then SSH access to my linux box. So.... I can't run windows utilities like shutdown.exe or tsshutdn.exe
Akirasoft is offline   Reply With Quote
Old 12-04-2006, 11:41 AM   #7
Protege Menace
Scooby Specialist
 
Member#: 41950
Join Date: Aug 2003
Chapter/Region: International
Location: www.faqurug.com
Vehicle:
faq u rug

Default

Protege Menace is offline   Reply With Quote
Old 12-04-2006, 12:21 PM   #8
Akirasoft
Scooby Guru
 
Member#: 2973
Join Date: Nov 2000
Chapter/Region: MWSOC
Location: Inverness, IL
Vehicle:
2018 Camaro ZL1 1LE
Red

Default

Quote:
Originally Posted by Protege Menace View Post
ok terrific
Akirasoft is offline   Reply With Quote
Old 12-04-2006, 12:22 PM   #9
vtecTHIS
Scooby Guru
 
Member#: 48048
Join Date: Nov 2003
Chapter/Region: International
Vehicle:
.

Default

i only understand 6 words of the title. glad i could help
vtecTHIS is offline   Reply With Quote
Old 12-04-2006, 12:23 PM   #10
bpwatts
Scooby Specialist
 
Member#: 111635
Join Date: Apr 2006
Default

Quote:
Originally Posted by Akirasoft View Post
thats actually a windows python script.
No, its a python script. Its also a way to shut down a windows box from a linux box.

Windows Python script?

That's like saying, "That's a Linux Java script"

Anyhow, I gave you the answer :P

#!/usr/bin/env python
# win32shutdown.py
bpwatts is offline   Reply With Quote
Old 12-04-2006, 12:27 PM   #11
Akirasoft
Scooby Guru
 
Member#: 2973
Join Date: Nov 2000
Chapter/Region: MWSOC
Location: Inverness, IL
Vehicle:
2018 Camaro ZL1 1LE
Red

Default

Quote:
Originally Posted by bpwatts View Post
No, its a python script. Its also a way to shut down a windows box from a linux box.

Windows Python script?

That's like saying, "That's a Linux Java script"

Anyhow, I gave you the answer :P

#!/usr/bin/env python
# win32shutdown.py
ok, find me win32 python apis for linux, I cant seem to find any anywhere, they certainly arent present in my python install.
Akirasoft is offline   Reply With Quote
Old 12-04-2006, 12:27 PM   #12
Akirasoft
Scooby Guru
 
Member#: 2973
Join Date: Nov 2000
Chapter/Region: MWSOC
Location: Inverness, IL
Vehicle:
2018 Camaro ZL1 1LE
Red

Default

Traceback (most recent call last):
File "winshutdown.py", line 4, in ?
import win32api
ImportError: No module named win32api
Akirasoft is offline   Reply With Quote
Old 12-04-2006, 12:31 PM   #13
bpwatts
Scooby Specialist
 
Member#: 111635
Join Date: Apr 2006
Default

Quote:
Originally Posted by Akirasoft View Post
Traceback (most recent call last):
File "winshutdown.py", line 4, in ?
import win32api
ImportError: No module named win32api
http://sourceforge.net/projects/pywin32/

Any other questions?

Get the last file in the download section, platform independant.
bpwatts is offline   Reply With Quote
Old 12-04-2006, 12:35 PM   #14
Akirasoft
Scooby Guru
 
Member#: 2973
Join Date: Nov 2000
Chapter/Region: MWSOC
Location: Inverness, IL
Vehicle:
2018 Camaro ZL1 1LE
Red

Default

Quote:
Originally Posted by bpwatts View Post
http://sourceforge.net/projects/pywin32/

Any other questions?

Get the last file in the download section, platform independant.
Platform independant in that its not a windows EXE. That download is still windows only, did you even read the page?

Operating System : 32-bit MS Windows (95/98), 32-bit MS Windows (NT/2000/XP), All 32-bit MS Windows (95/98/NT/2000/XP), WinCE, Win2K, WinXP
Akirasoft is offline   Reply With Quote
Old 12-04-2006, 12:43 PM   #15
bpwatts
Scooby Specialist
 
Member#: 111635
Join Date: Apr 2006
Default

Quote:
Originally Posted by Akirasoft View Post
Platform independant in that its not a windows EXE. That download is still windows only, did you even read the page?

Operating System : 32-bit MS Windows (95/98), 32-bit MS Windows (NT/2000/XP), All 32-bit MS Windows (95/98/NT/2000/XP), WinCE, Win2K, WinXP
Not windows only as it includes the .py libraries if you look in the directory structure. But your right, it doesn't have the win32api. Are you sure you have python completely installed? It works for me.
bpwatts is offline   Reply With Quote
Old 12-04-2006, 12:45 PM   #16
Akirasoft
Scooby Guru
 
Member#: 2973
Join Date: Nov 2000
Chapter/Region: MWSOC
Location: Inverness, IL
Vehicle:
2018 Camaro ZL1 1LE
Red

Default

Quote:
Originally Posted by bpwatts View Post
Not windows only as it includes the .py libraries if you look in the directory structure. But your right, it doesn't have the win32api. Are you sure you have python completely installed? It works for me.
yeah python is completely installed. the win32 apis are not present because I am not running win32. The win32 python apis tie into things like windows platform sdk's which are only available on windows. Sure the scripts can be platform independant, but the one you mentioned employs libraries that hook into windows functions that are only available on windows.
Akirasoft is offline   Reply With Quote
Old 12-04-2006, 12:47 PM   #17
bpwatts
Scooby Specialist
 
Member#: 111635
Join Date: Apr 2006
Default

Quote:
Originally Posted by Akirasoft View Post
yeah python is completely installed. the win32 apis are not present because I am not running win32. The win32 python apis tie into things like windows platform sdk's which are only available on windows. Sure the scripts can be platform independant, but the one you mentioned employs libraries that hook into windows functions that are only available on windows.
It runs in UNIX. I'm not sure why the win32 libraries aren't available for download. I'll do some more searching.
bpwatts is offline   Reply With Quote
Old 12-04-2006, 12:53 PM   #18
martel
Scooby Specialist
 
Member#: 11178
Join Date: Oct 2001
Chapter/Region: South East
Location: Raleigh
Vehicle:
2017 Volt
I can haz mod?

Default

Quote:
Originally Posted by Akirasoft View Post
yeah thats great too, if I had a windows host available to run the command on


Basicaly the explanation, I have a linux host at home that I ssh into. I need to shutdown one of my windows boxes at home remotely, I have no access to that box other then SSH access to my linux box. So.... I can't run windows utilities like shutdown.exe or tsshutdn.exe
nub.
turn on telnet or install ssh or rsh on your winders box.
martel is offline   Reply With Quote
Old 12-04-2006, 01:01 PM   #19
bpwatts
Scooby Specialist
 
Member#: 111635
Join Date: Apr 2006
Default

I was under the impression shell scripts would save us all. Apparently this isn't the case. The python trick looks possible, but there's a bit more than just importing the win32api's....you've gotta register some extra stuff using SimpleXMLRPCServer in python first. My apologies.

http://www.microsoft.com/technet/int.../sfu35rsh.mspx

Looks like you could install that service and play with it on your windows box too.
bpwatts is offline   Reply With Quote
Old 12-04-2006, 01:07 PM   #20
WRX300
*** Banned ***
 
Member#: 17974
Join Date: Apr 2002
Chapter/Region: SWIC
Location: https://t.me/pump_upp
Default

maybe use this to remotely run pstools on the windows box?

http://eol.ovh.org/winexe/

Quote:

Sample usage

winexe -U domain/user%password //192.168.0.3 "ipconfig /all"
WRX300 is offline   Reply With Quote
Old 12-04-2006, 01:12 PM   #21
Akirasoft
Scooby Guru
 
Member#: 2973
Join Date: Nov 2000
Chapter/Region: MWSOC
Location: Inverness, IL
Vehicle:
2018 Camaro ZL1 1LE
Red

Default

Quote:
Originally Posted by martel View Post
nub.
turn on telnet or install ssh or rsh on your winders box.
thats an after the fact solution. I just need something right now

If I was actually at home, I could just forward RDP at the router as well... I just was looking to see if someone ported the shutdown.exe command or similiar to j00nix. Looks like that is not the case.
Akirasoft is offline   Reply With Quote
Old 12-04-2006, 01:31 PM   #22
Akirasoft
Scooby Guru
 
Member#: 2973
Join Date: Nov 2000
Chapter/Region: MWSOC
Location: Inverness, IL
Vehicle:
2018 Camaro ZL1 1LE
Red

Default

Quote:
Originally Posted by WRX300 View Post
maybe use this to remotely run pstools on the windows box?

http://eol.ovh.org/winexe/
I'm gonna give that a shot soon. samba is already setup on that box so we'll see what happens.
Akirasoft is offline   Reply With Quote
Old 12-04-2006, 01:43 PM   #23
martel
Scooby Specialist
 
Member#: 11178
Join Date: Oct 2001
Chapter/Region: South East
Location: Raleigh
Vehicle:
2017 Volt
I can haz mod?

Default

Quote:
Originally Posted by Akirasoft View Post
thats an after the fact solution. I just need something right now

If I was actually at home, I could just forward RDP at the router as well... I just was looking to see if someone ported the shutdown.exe command or similiar to j00nix. Looks like that is not the case.
If all ports are open to your linux box just use netcat to twist some ports and RDC through the linux box to the winders box.

So if no services are running on your windows machine how did you plan on sending this reboot command?
martel is offline   Reply With Quote
Old 12-04-2006, 02:04 PM   #24
Akirasoft
Scooby Guru
 
Member#: 2973
Join Date: Nov 2000
Chapter/Region: MWSOC
Location: Inverness, IL
Vehicle:
2018 Camaro ZL1 1LE
Red

Default

Quote:
Originally Posted by martel View Post
If all ports are open to your linux box just use netcat to twist some ports and RDC through the linux box to the winders box.

So if no services are running on your windows machine how did you plan on sending this reboot command?
1. the linux box only has ssh accessible to the outside world.

2. the windows shutdown command works without any special corresponding service running. I believe it just runs through the standard remote administration stuff.

Try it at home, grab the xp or w2k resource kit and install it. then run shutdown -r -m \\machinename, you can remotely reboot any machine you have administrator priveledges on.
Akirasoft is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I figured out one of the best ways to keep your subs from moving Un0RiGiNaL Car Audio, Video & Security 17 02-21-2009 10:24 AM
Government of Canada announces amendment to ease vehicle importation from the U.S. AVANTI R5 Non-Subaru News & Rumors 0 12-20-2007 02:05 PM
windows shortcut to shutdown? Caddy Daddy Off-Topic 29 08-04-2005 03:02 PM
Another UNIX Q: Mounting windows shares in Solaris TimStevens Off-Topic 3 03-18-2005 12:31 PM
Software guys: How do I compile files in UNIX that have Windows carriage-returns? perret318 Off-Topic 4 09-03-2004 04:22 PM

All times are GMT -4. The time now is 09:39 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2024 Axivo Inc.
Copyright ©1999 - 2019, North American Subaru Impreza Owners Club, Inc.

As an Amazon Associate I earn from qualifying purchases.

When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission
Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.