Proposing Code Domation to Samba -> Incl ability to remotestart Win program from Samba client

Michael B Allen mba2000 at ioplex.com
Thu Mar 24 03:13:14 GMT 2005


Jeff Gehlbach said:
> Hi!
>
> On Wed, Mar 23, 2005 at 11:31:22AM -0600, Gerald (Jerry) Carter wrote:
>> Michael Lueck wrote:
>> | I need to have the ability for a Samba client running on Linux to send
>> | the correct SMB over to a Windows box to have it start a process over
>> | there. SysInternals has developed such an add-on (PsExec.exe) for
>> Win32,
>> | and MS has one in the resource kit. As far as I can tell, this
>> | functionality has not been put into the Samba project. (Please correct
>> | me if I am wrong)
>> | <SNIP>
>>
>> If this is just an rpc for psexec.exe, then we can add it
>> pretty easily.  Can you send me a trace of psexec starting the
>> application on a remote Windows server ?
>
> There is no built-in RPC that I'm aware of for spawning arbitrary
> executables.

Yeah there is. There's atsvc.ScheduleJobAdd(). Of course it can take up to
60 seconds for the schedualed job to run and once the call is made the RPC
just returns so if you need to read the output or get a return code you
would have to fudge something.

But technically it works. JCIFS has an example that launches notepad.exe
on the target machine.

Mike



More information about the samba-technical mailing list