[Samba] Execute a Windows .bat from Linux

Luke Barone lukebarone at gmail.com
Thu Oct 7 01:01:23 UTC 2021


You can also use Powershell on Linux now, so use that to connect to your
Windows box and run the commands.

On Wed, Oct 6, 2021 at 2:27 PM Christopher Cox via samba <
samba at lists.samba.org> wrote:

> On 10/6/21 4:03 PM, Rommel Rodriguez Toirac via samba wrote:
> > El 6 de octubre de 2021 16:57:02 GMT-04:00, David Mulder via samba <
> samba at lists.samba.org> escribió:
> >> Windows 10 has ssh support. You could ssh into the machine, then
> >> execute those commands.
>
> Note: you'll often need a credential to do most things.
>
> Alternatively, using WinRM integration from Ansible I can run arbitrary
> commands
> using my already kerberos'd session from a joined host.  There, the
> kerberos
> ticket id (if it has the privs) may be enough.
>
> >>
> >> On 10/6/21 2:53 PM, Rommel Rodriguez Toirac via samba
> >> <samba at lists.samba.org> wrote:
> >>> I use the following command to remotely shut down some Windows OS
> >> servers from
> >>> a Linux OS PC (for example):
> >>>
> >>> net rpc SHUTDOWN -f -I 192.168.1.5 -U Administrador%su_contrasenna -W
> >> GTMBD
> >>>
> >>> but in one of them before shutting down I need to run some commands
> >> to
> >>> disassemble and close a database system running on it.
> >>> Is there a way to achieve it using some combination of samba? that
> >> is, from a
> >>> PC with Linux operating system order the execution of a file.bat on a
> >> PC with
> >>> Windows operating system.
> >>>
> >>> I hope understand the point.
> >>>
> >>> Thank in advance.
> >>>
> >>>
> >
> >
> >   Thanks for write me back, but is not a Windows 10
> >
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>


More information about the samba mailing list