Ubuntu: “Authentication is required to check power state for…” after login from encrypted user



Question:

One of the users on my system (Ubuntu 14.04) has an encrypted home directory... after I log out of the encrypted user and log into another unencrypted user, I am getting a series of window asking me to authenticate myself. I did not use to see them before I created the encrypted user, and when I nevertheless enter the password, it keeps asking me to enter the password or about 10 more times until it eventually stops....

enter image description here

If I click on the "Cancel" button, I see the following error message:

enter image description here

What can I do to stop the authentication requirements when I log in?


Solution:1

I highly doubt that the encrypted home directory is the culprit since I am also greeted by these happy little password boxes any time I switch TTY's or VT's without having any encryption on my home directory. If I cancel them, nothing really happens except the indicator-sensors package becomes a stale application with sensor readings from before I cancelled the pop-ups.

Do you by any chance have the package indicator-sensors installed on your system? You can verify it is, or is not, by typing dpkg -s indicator-sensors in a terminal window.

A possible workaround for this problem is to add the user to a group that has the rights to read the power state. - I have yet to figure out which group this is though, and if it's even advisable.


Edit:

I have tracked down the issue to the udisks2 package. A quick search led me to this forum. I do not advise to pull this guy/gal's trick on your own machine though. There has to be a cleaner way.


Edit 2:

I found this Debian bug report, but this is regarding the "latest" (Thu, 22 Jan 2015) unstable build. This ArchWiki article might hold a fix, but polkit is not standard on *buntu systems. *Buntu systems do have policykit-1, so it might work with some adjustments.

I also found this Debian forum thread, which seems to be talking about the same issue.


Edit 3:

Here is an example of a polkit group called "storage". However, this is for VoidLinux. *Buntu does have /etc/polkit-1/ but it does not contain a rules.d directory.

All signs point to adding the user to the right group. On Arch systems this group is named "storage", but *buntu does not have this group (on my system). You can check if you have this group by typing cut -d: -f1 /etc/group | grep storage in a terminal window. I did find a group called "disk" but I would advise against adding yourself to thathttp://askubuntu.com/posts/678230 group.

The disk device nodes are group accessible to disk so that programs that need access to them will set their group ID to be disk. This group has write access to all the raw disk devices (/dev/hd* and /dev/sd*), so assigning users to group disk is both dangerous and a security risk.


Edit 4:

After fiddling around a little, I think I found the solution. You indeed need to create a new group that has authority to mount and read disks. This is done like so:

cd /usr/share/polkit-1/actions/ #this is where your policies are stored  ls -la | grep org.freedesktop #find the correct policy. Should be udisks2.policy  <your-text-editor-here> <policy-file>  

Now you can edit the policy file accordingly. Since I did not have the exact same problem, I cannot post my fix. But here's what I found while applying my fix:

<action id="org.freedesktop.udisks2.ata-check-power">      <description>Check power state</description>      <message>Authentication is required to check the power state</message>      <defaults>          <allow_any>auth_admin</allow_any>          <allow_inactive>auth_admin</allow_inactive>          <allow_active>yes</allow_active>      </defaults>  </action>  

Based on your problem description I would suggest fiddling with this section until the pop-ups stop showing up.


Solution:2

Had the same problem today (28th Sep 2015) after an update. I was to lazy thou to solve the problem, I just disabled the udisks2 plugin in hardware sensor indicator. It seemed to be the source of the annoying authorization requests.

Cheers, Stwur


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »