Windows 8 : how to enable "net rpc shutdown"

I'm a student and have a few servers/clients at home. One of those computers is running on Windows 8. On this network, I have an embedded system on Debian that I use for VPN and SMB purposes. I has already scripts that do some wakeOnLan.

I've found recently that I can shutdown computers with Samba, using the command net rpc shutdown.

However, when I do it, i get an error:

could not initialise pipe \winreg. Error was NT_STATUS_OBJECT_NAME_NOT_FOUND

I've found here that a local user was, by default, not allowed to perform a shutdown remotely.

I've searched into the register the key to edit, but I couldn't find it. It's at another place.

So, do you know how I can enable this "shutdown on LAN"?


Missing \winreg might mean that the RemoteRegistry service is not running; try using the following commands in Windows:

sc config RemoteRegistry start= auto
sc start RemoteRegistry