Remote Procedure Call (RPC) in a script

Is it possible to make a Remote Procedure Call (RPC) in a script to another device on the netwerk?
Now the WOL message used to startup an PC in my network.

Next I will shutdown this PC. This must be possible with the next command:
net rpc shutdown -I -U <username%password>

Is there a way to make a Remote Procedure Call from the Teltonika?

Hello,

Natively, it is not possible to make RPC calls directly from RutOS. However, you can explore third-party solutions, such as installing samba4-client or similar OpenWrt packages, which provide the net rpc utility and could allow executing commands like net rpc shutdown.

Please note that this approach is not officially supported or tested, as these packages come from the OpenWrt distribution and may not fully align with RutOS. Use it with caution and at your own discretion.

Best regards,

Thanks for your support.
I try to install “samba4-client” in the CLI with the “opkg” command. But that was not possible.
Next, I try to found a already compiled “samba4-client” installation package. But I found only smaba36-client packages.
Must I compile my own samba4-client package with source code from the OpenWrt website?

Hello,

samba4-client could be installed from the openwrt distfeeds, however, please note that most openwrt packages are not officially supported or guaranteed to be compatible with RutOS, so using them should be done with caution and at your own discretion.

To find if samba4-client is available on openwrt distfeeds, you can try the following commands:

opkg -e /etc/opkg/openwrt/distfeeds.conf update

opkg -e /etc/opkg/openwrt/distfeeds.conf list | grep samba4

Alternatively, if preferred, you can compile the samba4-client package from openwrt source using the SDK tool. More information and instructions on SDK are available here:

Best regards,

Hello,

When I try to update and install the samba4-client, with these commands. I get the next error result:

root@RUT956:/# opkg -e /etc/opkg/openwrt/distfeeds.conf update

Downloading: a few .sig
Signature check passed.
Downloading: a few
.gz
Signature check passed.

***Failed to download the package list from_https://downloads.openwrt.org/releases/21.02.0/packages/mipsel_24kc/vuci/Packages.gz

Collected errors:
*opkg_download:Failed to download_https://downloads.openwrt.org/releases/21.02.0/packages/mipsel_24kc/vuci/Packages.gz, wget returned.

root@RUT956:/# opkg -e /etc/opkg/openwrt/distfeeds.conf list | grep samba4
grep: samba4opkg: No such file or directory
grep: list: No such file or directory

But the installation of samba4 works now. With the command that you send in the second post. I will test if the “net rpc” command works now

There is no “net rpc” command available yet.
When I type “ubus list” this command is not in the list.
And when I type “net –help” the command is not found.

Hello,

Thank you for the update.

In this case, it seems that the third-party OpenWrt samba4-client package you’re trying to use is either not compatible with RutOS or outdated for it.

At the moment, only the samba36-server package is officially supported and available through the RUTOS opkg repository. This package provides SMB protocol support and can be installed directly from the official repository (opkg update && opkg install samba36-server). All necessary information for this package can be found on the OpenWrt page here:

Best regards,

Thanks for the help, but I do not see a possibility to send an RPC command with Samba36-server.