vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| ["Followup-To:" header set to alt.os.linux.suse.] Axel Werner wrote: > HOW TO shutdown Windows Server from Windows Console ?? (without Telnet > Server installed) With a hammer. What did I win? houghi -- The blue light suddenly flashed on my horrified face. What a disaster! Oh, the humanity! I never thought it would happen to me. How terrifying it is to see for yourself "*The Blue Screen of Death*". |
| |||
| Am Wed, 11 Jul 2007 10:36:41 +0200 schrieb Axel Werner: > HOW TO shutdown Windows Server from Windows Console ?? (without Telnet > Server installed) You'll need first access to the server itself (ssh, telnet or similar), you should also have a shutdown.exe on the system (depends on the system). If not available see the link and build your own shutdown CLI (http://msdn2.microsoft.com/en-us/library/aa376883.aspx). cheers |
| |||
| On Wed, 11 Jul 2007 10:36:41 +0200, Axel Werner wrote: > HOW TO shutdown Windows Server from Windows Console ?? (without Telnet > Server installed) Just pull the power cord out of the wall socket. -- "Ubuntu" -- an African word, meaning "Slackware is too hard for me". |
| |||
| On Jul 11, 4:36 am, Axel Werner <axel.wer...@akadpol.bwl.de> wrote: > HOW TO shutdown Windows Server from Windows Console ?? (without Telnet > Server installed) > > are there any linux-forged CLI tools available ? I don't know of any Linux forged tools, but if you are running wine you can download pstools. There is a tool bundled called psshutdown that has all the functions of shutdown.exe and then some. |
| |||
| DarthTBone@gmail.com schrieb: > I don't know of any Linux forged tools, but if you are running wine > you can download pstools. There is a tool bundled called psshutdown > that has all the functions of shutdown.exe and then some. thanks fer your smart reply!! much smarter than all the other replies yet. those other replies are mostly lame and boring. not funny at all. i know pstools and psshutdown. this is what im looking for, but for use on linux consoles without any telnet or even wine but thanks anyway for hint. at least wine would be a solution to bring pstools alive on linux. anyone got another hint to bring down a windows server from linux console ? |
| |||
| Dan C schrieb: > Just pull the power cord out of the wall socket. seems someone pulled off the cord from your brain and its not even funny. next time reading the question before answering might help! |
| |||
| On Jul 12, 10:25 am, Axel Werner <axel.wer...@akadpol.bwl.de> wrote: > DarthTB...@gmail.com schrieb: > > I don't know of any Linux forged tools, but if you are running wine > > > you can download pstools. There is a tool bundled called psshutdown > > that has all the functions of shutdown.exe and then some. > > thanks fer your smart reply!! much smarter than all the other replies > yet. those other replies are mostly lame and boring. not funny at all. > > i know pstools and psshutdown. this is what im looking for, but for use > on linux consoles without any telnet or even wine > > but thanks anyway for hint. at least wine would be a solution to bring > pstools alive on linux. > > anyone got another hint to bring down a windows server from linux console ? Here is a python script I got from: http://www.linuxforums.org/forum/red...linux-box.html #!/usr/bin/env python # win32shutdown.py import win32api import win32con import win32netcon import win32security import win32wnet def shutdown(host=None, user=None, passwrd=None, msg=None, timeout=0, force=1, reboot=0): """ Shuts down a remote computer, requires NT-BASED OS. """ # Create an initial connection if a username & password is given. connected = 0 if user and passwrd: try: win32wnet.WNetAddConnection2(win32netcon.RESOURCET YPE_ANY, None, ''.join([r'\\', host]), None, user, passwrd) # Don't fail on error, it might just work without the connection. except: pass else: connected = 1 # We need the remote shutdown or shutdown privileges. p1 = win32security.LookupPrivilegeValue(host, win32con.SE_SHUTDOWN_NAME) p2 = win32security.LookupPrivilegeValue(host, win32con.SE_REMOTE_SHUTDOWN_NAME) newstate = [(p1, win32con.SE_PRIVILEGE_ENABLED), (p2, win32con.SE_PRIVILEGE_ENABLED)] # Grab the token and adjust its privileges. htoken = win32security.OpenProcessToken(win32api.GetCurrent Process(), win32con.TOKEN_ALL_ACCESS) win32security.AdjustTokenPrivileges(htoken, False, newstate) win32api.InitiateSystemShutdown(host, msg, timeout, force, reboot) # Release the previous connection. if connected: win32wnet.WNetCancelConnection2(''.join([r'\\', host]), 0, 0) if __name__ == '__main__': # Immediate shutdown. shutdown('salespc1', 'admin', 'secret', None, 0) # Delayed shutdown 30 secs. shutdown('salespc1', 'admin', 'secret', 'Maintenance Shutdown', 30) # Reboot shutdown('salespc1', 'admin', 'secret', None, 0, reboot=1) # Shutdown the local pc shutdown(None, 'admin', 'secret', None, 0) |
| |||
| On Jul 12, 10:25 am, Axel Werner <axel.wer...@akadpol.bwl.de> wrote: > DarthTB...@gmail.com schrieb: > > I don't know of any Linux forged tools, but if you are running wine > > > you can download pstools. There is a tool bundled called psshutdown > > that has all the functions of shutdown.exe and then some. > > thanks fer your smart reply!! much smarter than all the other replies > yet. those other replies are mostly lame and boring. not funny at all. > > i know pstools and psshutdown. this is what im looking for, but for use > on linux consoles without any telnet or even wine > > but thanks anyway for hint. at least wine would be a solution to bring > pstools alive on linux. > > anyone got another hint to bring down a windows server from linux console ? Here is a python script I got from: http://www.linuxforums.org/forum/red...linux-box.html #!/usr/bin/env python # win32shutdown.py import win32api import win32con import win32netcon import win32security import win32wnet def shutdown(host=None, user=None, passwrd=None, msg=None, timeout=0, force=1, reboot=0): """ Shuts down a remote computer, requires NT-BASED OS. """ # Create an initial connection if a username & password is given. connected = 0 if user and passwrd: try: win32wnet.WNetAddConnection2(win32netcon.RESOURCET YPE_ANY, None, ''.join([r'\\', host]), None, user, passwrd) # Don't fail on error, it might just work without the connection. except: pass else: connected = 1 # We need the remote shutdown or shutdown privileges. p1 = win32security.LookupPrivilegeValue(host, win32con.SE_SHUTDOWN_NAME) p2 = win32security.LookupPrivilegeValue(host, win32con.SE_REMOTE_SHUTDOWN_NAME) newstate = [(p1, win32con.SE_PRIVILEGE_ENABLED), (p2, win32con.SE_PRIVILEGE_ENABLED)] # Grab the token and adjust its privileges. htoken = win32security.OpenProcessToken(win32api.GetCurrent Process(), win32con.TOKEN_ALL_ACCESS) win32security.AdjustTokenPrivileges(htoken, False, newstate) win32api.InitiateSystemShutdown(host, msg, timeout, force, reboot) # Release the previous connection. if connected: win32wnet.WNetCancelConnection2(''.join([r'\\', host]), 0, 0) if __name__ == '__main__': # Immediate shutdown. shutdown('salespc1', 'admin', 'secret', None, 0) # Delayed shutdown 30 secs. shutdown('salespc1', 'admin', 'secret', 'Maintenance Shutdown', 30) # Reboot shutdown('salespc1', 'admin', 'secret', None, 0, reboot=1) # Shutdown the local pc shutdown(None, 'admin', 'secret', None, 0) |
| ||||
| On Jul 12, 4:28 pm, Axel Werner <axel.wer...@akadpol.bwl.de> wrote: > Dan C schrieb: > > > Just pull the power cord out of the wall socket. > > seems someone pulled off the cord from your brain > and its not even funny. next time reading the question before answering > might help! I thoiugh it was funny. |