Shutdown a remoter windows computer in linux
- SHUTDOWN A REMOTER WINDOWS COMPUTER IN LINUX UPDATE
- SHUTDOWN A REMOTER WINDOWS COMPUTER IN LINUX PASSWORD
Reboot the system while other users are logged inĪuthentication is required for rebooting the system while other users are logged in. Power off the system while other users are logged inĪuthentication is required for powering off the system while other users are logged in. # vi /usr/share/polkit-1/actions/įind the two sections below and make the changes highlighted. The current policy is defined in an XML file, editing this file allows us to change the way the system behaves in a similar way to the two rules above.
SHUTDOWN A REMOTER WINDOWS COMPUTER IN LINUX UPDATE
In trying to work out what is wrong I have however discovered that I can update the policy file directly, and though this is not encouraged it seems to work (for now). Unfortunately when I upgraded to latest version of Raspbian I noticed that these two rules stopped working and I have not been able to discover why, though I suspect either the folder these files should be in has moved, or the name of the action in the rule has changed (adding the actions from the the policy file in the next section doesn’t work). You can combine both these rules in a single file, all that matters is where it is and that it ends in ‘.pkla’. # vi /var/lib/polkit-1/localauthority/50-local.d/\Īction=.restart .restart-multiple-users Identity=unix-user:lightdm unix-group:usersĪction=.stop .stop-multiple-users # vi /var/lib/polkit-1/localauthority/50-local.d/\ To allow ordinary users to shut down or reboot the system once they are logged in we need to make sure that all users can do so, and to allow the system to be shut down or rebooted from the remote login screen we need to make sure that the display manager do so as well (the user name used by the display manager depends on the display manager used, in this case I’m using ‘lightdm’).
![shutdown a remoter windows computer in linux shutdown a remoter windows computer in linux](https://static1.makeuseofimages.com/wordpress/wp-content/uploads/2017/05/linux-terminal-shutdown.jpg)
$ suīy default ‘policykit’ should look for additional rules in ‘/var/lib/polkit-1/localauthority/’ and apply these in the correct order.
![shutdown a remoter windows computer in linux shutdown a remoter windows computer in linux](http://toastytech.com/guis/98lite4shutdown.png)
These actions are controlled by ‘policykit’ and we can change the defaults by creating a couple of additional rules or modifying the policy file.īefore we can edit anything we need to be running as root. This is intentional, after all it would be not be a good thing if anyone could just shutdown a linux server just by making a connection to the display manager and selecting shutdown or for a user to be able to shut down the system if someone else was using it! However, sometimes is can be very convenient to be able to do so, such as when connecting remotely to a Raspberry that does not have a screen attached.
SHUTDOWN A REMOTER WINDOWS COMPUTER IN LINUX PASSWORD
If you are connecting to an X Window session on one machine remotly from another machine running X Windows then by default you will not be able to shut down or reboot the system from the login screen, and will have to enter a password to shut down or reboot the system when logging out.