[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian 8: Shutdown, Reboot, Suspend und Hibernate only after entering root password



Op Thu, 14 Jan 2016 16:10:03 +0100 schreef Christoph Pleger <Christoph.Pleger@cs.tu-dortmund.de>:

Hello,

Some days ago, I installed some machines with Debian jessie. Now I want to
achieve that, from the different desktop environments (KDE, GNOME, etc.),
the computers can only be shutdown, rebooted, suspended or hibernated,
after entering the root password.

In Debian 7, I achieved that by creating a file
/etc/polkit-1/localauthority/50-local.d/custom-menu.pkla with the
following contents:

[Disable suspend]
 Identity=unix-user:*
 Action=org.freedesktop.upower.suspend
 ResultActive=no
 ResultAny=no

[Disable hibernate]
 Identity=unix-user:*
 Action=org.freedesktop.upower.hibernate
 ResultActive=no
 ResultAny=no

[Disable shutdown]
 Identity=unix-user:*
 Action=org.freedesktop.consolekit.system.stop
 ResultActive=no
 ResultAny=no

[Disable reboot]
 Identity=unix-user:*
 Action=org.freedesktop.consolekit.system.restart
 ResultActive=no
 ResultAny=no


In Debian 8, this does not have the desired effect any more. Obviously,
the names of the actions have been changed to
org.freedesktop.login1.reboot etc., but even after replacing the action
names in custom-menu.pkla accordingly, no root authentication is required
before shutting down the computers.

So, what is the correct way to achieve my goal in jessie?

Viele Grüße
  Christoph



Is there an other file with a higher number which overwrite the current one?

success,

Floris


Reply to: