I just installed wheezy and installed the default Gnome desktop environment that boots to the Gnome-Login-Screen. If you do that you are asked for the root password when using shutdown/restart on the login-screen. The same happens when you are logged in and use the "Power off.." option when klicking the menu at the top right in combination with the ALT-key.
I solved this problem the following way: Add a powerdev group (seems to be expected in debian but was not created by the Wheezy-installation), add the users to that group, allow grant policies to that group to allow shutdown/restart.
Here are the steps in detail:
Create the group powerdev:
Code: Select all
groupadd powerdev
Code: Select all
# do the following for each username that should be allowed to shut down and restart the system
adduser [i]yourAccountName[/i] powerdev
# The Gnome-Login-Manger runs as user "Debian-gdm"
adduser Debian-gdm powerdev
Create a file /etc/polkit-1/localauthority/50-local.d/10-power.pkla with the following content:
Code: Select all
[Local restart]
Identity=unix-group:powerdev
Action=org.freedesktop.consolekit.system.restart
ResultAny=yes
ResultInactive=no
ResultActive=yes
[Local shutdown]
Identity=unix-group:powerdev
Action=org.freedesktop.consolekit.system.stop
ResultAny=yes
ResultInactive=no
ResultActive=yes
[Local restart - multiple]
Identity=unix-group:powerdev
Action=org.freedesktop.consolekit.system.restart-multiple-users
ResultAny=yes
ResultInactive=no
ResultActive=yes
[Local shutdown - multiple]
Identity=unix-group:powerdev
Action=org.freedesktop.consolekit.system.stop-multiple-users
ResultAny=yes
ResultInactive=no
ResultActive=yes
After that steps the shutdown/restart functions should work without asking for the root password.
I hope this is helpful. It works and makes sense to me. But let me know if this insttructions are bad/incorrect!
Also i wonder why the powerdev group is not created by the Wheezy installation. I think all three steps should automatically happen when someone installs a fresh system with the default desktop.