[CentOS] Turning off Win2008 machines from a CentOS box

Wed Apr 30 18:19:56 UTC 2008
John R Pierce <pierce at hogranch.com>

Joseph L. Casale wrote:
> I understand this may be able to be done with Samba?
> Anyone know the syntax for a CentOS 5.1 Samba client
> and what needs to be done to Windows 2008 Server to
> allow this (I suspect out of the box it wouldn't allow it)?
>   

I haven't tested this, but in theory...

    $ net rpc shutdown -U Administrator -S servername

and it will prompt for the Administrator account password.  
Administrator can be replaced with any windows account that has admin 
privs on the target server.    If its in a domain, presumably you could 
use DOMAINNAME\\domainuser as the username, where that domainuser has 
admin privs on the server.

this assumes you're on the same network and not firewalled against basic 
RPC type operations, this would be the case in the typical business 
network, but NOT if the machine is hardened and running as an internet 
server or in a DMZ.