[Samba] Shutting down a remote PC via "net rpc"
Stefan G. Weichinger
lists at xunil.at
Tue Dec 22 08:29:27 UTC 2020
Am 17.12.20 um 10:14 schrieb Stefan G. Weichinger via samba:
> Am 16.12.20 um 12:59 schrieb Michael Howard via samba:
>> On 16/12/2020 11:36, Michael Howard via samba wrote:
>>> On 16/12/2020 09:55, Stefan G. Weichinger via samba wrote:
>>>> Am 14.12.20 um 19:17 schrieb Stefan G. Weichinger via samba:
>>> net rpc shutdown -C "MESSAGE" -t 60 -f -I HOSTNAME
>>> -UAdministrator%'PASSWORD' -W DOMAIN
>>> Works for me here from the command line, from a bash script and the
>>> same script from cron. The tested PC is Windows 10 Ent. The only
>>> quoting used is on the password as it contains a pipe sign, amongst
>>> other non alphabetics.
>> .... obviously the 'message' is in double quotes.
> Looks nearly like my try. I had the whole 'user%pw' quoted. We'll try
> that variation, thanks.
Still no success.
I upgraded to samba-4.12.10 now (thanks, Louis), just in case.
I know it should not be an issue, but I wonder if the "//" in the
password somehow is a problem when called from within the bash script.
We will test another password soon, just to see what happens.
And maybe "#!/bin/sh" ... I still don't see why it works from the bash
and not in the script (we need it as cron job in the end).
More information about the samba