Shutdown a remote computer from linux

 Shutdown a remote computer from linux

##Setup to do on Windows 10 machine: 1) run "secpol.msc" - In the program tree, open "Security Settings / Local Policies / User rights Assignment" - Find the entry “Force shutdown from a remote system” - Edit the entry, add the CONCRETE user that will be used for shutdown (ex: nouknouk) 2) Run regedit.exe as Administrator - Find: HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System - Create a new registry DWORD(32) value named "LocalAccountTokenFilterPolicy" and then assign it the value '1' 3) Setup remote registry service: - open “cmd.exe” as administrator - execute the two following commands: sc config RemoteRegistry start= auto sc start RemoteRegistry 4) Config Firewall allow remote shutdow - Open Firewall and check : File and printer sharing ## Setup to do on linux machine: 1) install the "samba-common" package: It depends on your linux distribution, but for Debian and derivated (Ubuntu, Linux Mint, ...), the apt-get command can be executed like that: - Ubuntu: apt-get install samba-common - CentOS: yum install samba-common 2) To actually shutdown your windowsmachine from the linux one, run the following command: net rpc shutdown -f -t 0 -C 'message' -U userName%password -I xxx.yyy.zzz.ttt Where: '-f' means 'force' the shutdown (I think it's mandatory) '-t 0' is the delay before doing it (0 means 'right now'). '-U user%password' is the local user and his password on the windows machine (the one that has been alloed to do remote shutdown in point A). '-I' is the IP address of the windows machine to shutdown.
VIDEO:


Share on Google Plus

About howtoused

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment