FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 04-30-2008, 05:39 PM
"Joseph L. Casale"
 
Default Turning off Win2008 machines from a CentOS box

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 was hoping to use SSH with keys and script the login
and execution of the native win shutdown command, but
I have had troubles making any of the usual win SSH
Daemons work under Windows 2008 Server x64.

Any ideas would be appreciated!
jlc
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-30-2008, 06:19 PM
John R Pierce
 
Default Turning off Win2008 machines from a CentOS box

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 DOMAINNAMEdomainuser 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.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-30-2008, 06:26 PM
Toby Bluhm
 
Default Turning off Win2008 machines from a CentOS box

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 was hoping to use SSH with keys and script the login
and execution of the native win shutdown command, but
I have had troubles making any of the usual win SSH
Daemons work under Windows 2008 Server x64.





winexe opens a command prompt on XP boxes. You can script the shutdown -
have no idea if it'll work on 2008:


winexe -A $accountname //$computername "cmd /c shutdown -s -t 60"

and down it goes.


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


--
Toby Bluhm
Alltech Medical Systems America, Inc.
30825 Aurora Road Suite 100
Solon Ohio 44139
440-424-2240


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 05-01-2008, 12:13 AM
"Joseph L. Casale"
 
Default Turning off Win2008 machines from a CentOS box

>I haven't tested this, but in theory...
>
> $ net rpc shutdown -U Administrator -S servername

That worked perfectly and simplified my procedure greatly!
Thanks,
jlc
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 11:17 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org