15

While logged in as a sudo user, click the right top power icon, then select and click Shutdown menu, it comes up with a dialog asking if I want to close all programs. The dialog has two options: restart or shutdown. Choose either one logs me out. Syslog has the following line about restart:

WARNING: Unable to restart system: Authorization is required

This happened after I installed NTP and some OpenStack packages while working in a prototype project. My Ubuntu's software is up to date as of this writing.

Anyone encountered the same problem in 12.04?

4
  • 1
    What is logged in as sudo user? Apr 15 '12 at 15:53
  • "While logged in as a sudo user" I mean the default user created by Ubuntu installation. This user can run commands like "sudo ....".
    – jenls
    Apr 15 '12 at 16:17
  • 1
    Same problem here under 12.04 (Lenovo thinkpad x121e). Can only use command line to restart/shut down the computer. Side effect is that my wife considers me a geek now as I shut down my laptop like this.
    – HongboZhu
    Apr 18 '12 at 11:58
  • very bad bug, exists from 10.10 until now
    – pylover
    Nov 18 '13 at 2:57
8

Sadly this is a known bug in (probably) consolekit LP #838792

The workaround for the time is

sudo reboot

sudo shutdown now -P
3

This should solve your problem: https://www.grendelman.net/wp/policykit-adventures/

1

Following these websites information: http://www.freedesktop.org/software/polkit/docs/0.105/pklocalauthority.8.html and https://bugs.launchpad.net/ubuntu/+source/policykit/+bug/1033305

Seems to have resolved our problems with the lightdm shutdown button not working for all users on Ubuntu 12.04.3 LTS (GNU/Linux 3.11.6-031106-generic x86_64)

vim /var/lib/polkit-1/localauthority/20-org.d/usershutdown.pkla

Then add the following lines to the file.

[Allow Shutdown]<br>
Identity=unix-user:\*;unix-group:*<br>
Action=org.freedesktop.consolekit.system.stop-multiple-users<br>
ResultAny=yes<br>
ResultInactive=yes<br>
ResultActive=yes<br>

[Allow Restart]<br>
Identity=unix-user:\*;unix-group:*<br>
Action=org.freedesktop.consolekit.system.restart-multiple-users<br>
ResultAny=yes<br>
ResultInactive=yes<br>
ResultActive=yes<br>

Then enter service lightdm restart and/or a reboot of the machine is needed. Tried before logging into the machine and then again after someone logged in.

0

My workaround for this annoying little bug is this, I create a launcher with the following:

To Shutdown:
sudo shutdown -h

To Restart:
sudo shutdown -r

You will then be asked your super user password. I put this launcher on the desktop and use that until the bug is sorted out.

1
  • 1
    its not a little bug, its a big bug
    – pylover
    Nov 18 '13 at 2:57
0

Maybe the problem is caused by the HSQLDB Server. I just filled a bug about it:

https://bugs.launchpad.net/ubuntu/+source/hsqldb/+bug/1153856

Workaround:

sudo apt-get remove hsqldb-server
0

I had the same troubles - the guilty one was kalarm. After I disabled it, shutdown started to work properly again.

1
  • How do you disable this?
    – Tim
    Aug 19 '14 at 21:27
0

A GUI resolution is to install Cairo-dock from the repository and click on the Shutdown button on that menu to shutdown or restart.

While using the terminal commands work. For some people, having to go to a terminal screen is at least, overly complicated, and also a lot of work.

I've been using this Gui workaround for the past 6 Ubuntu version releases.

This can be installed from the software center or cli:

$ sudo apt-get install cairo-dock

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.